[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling ncurses-6.1 on OpenBSD

From: Robert Smith
Subject: Re: Compiling ncurses-6.1 on OpenBSD
Date: Tue, 16 Jul 2019 11:56:13 +0900

Thank you Gentlemen so much for looking at this. Our stack requires some of the newer features of ncurses and we've been able to build pretty successfully on OpenBSD until recently.

I found the following while I was searching for a solution. I dismissed it because I didn't see g++ getting executed so I did not realize that these were c++ files.

Does it help this situation?

The following text found here: https://stackoverflow.com/questions/2543813/ld-reports-missing-symbols-but-symbols-seem-to-exist

Those symbols are unmangled C symbols. As you have tagged this as C++, I assume you are compiling with C++. If you do that you may need to wrap your libraries header files in an extern block in your code:

extern "C" {
#include "library.h"

where library.h is the name of the library's header file(s), to prevent them being mangled in the calling code.


On Jul 13, 2019, at 9:58 AM, Thomas Dickey <address@hidden> wrote:

On Fri, Jul 12, 2019 at 09:45:05PM +0900, Robert Smith wrote:
Hello all,

Has anyone successfully compiled ncurses-6.1 on OpenBSD 6.5?

I have tried almost every combination of configuration options available and they always result in the linker not being able to link one of the programs that get built in the test directory to libncurses shared library.

I've been working on this for a couple of days and have tried just about every kind of configuration option combination imaginable.

All tests run using ncurses-6.1-20190706

I can reproduce this failure :-)

Get the following errors on different runs.

actually there's a half-dozen cases that I see - but they're all basically
the same problem.

ld: error: undefined symbol: use_tioctl

ld: error: undefined symbol: init_extended_color

ld: error: undefined symbol: extended_color_content

yes - even when you turn on the rpath option, the BSD's notion of weak
linkage is too weak to actually pull in the dependent libraries without
some effort.  Since OpenBSD's curses library is ~11 years old, there
are a few new symbols...

Others from memory include

Every single time the symbols exist in the library but they just do not link properly

(I last built for OpenBSD 6.2 in February).

I installed the new OpenBSD this evening to take a look.
My usual script for development happens to work.
Looking at that, I see that I'm doing this, which is relevant:

+ adding "--enable-weak-symbols" and

+ setting the RPATH_LIST variable, e.g.,

RPATH_LIST=../lib:$MY_DIR/lib \

That compiles/links (but I'll investigate more).

Thomas E. Dickey <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]