bug-ncurses
[Top][All Lists]
Advanced

[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 16:18:40 +0900

Dear Thomas,

I did just try compiling with the following configure options:

root@test-op01:/usr/src/ncurses-6.1-20190706# RPATH_LIST=../lib:$prefix/lib ./configure --prefix=/opt/test --with-shared --enable-widec --with-cxx-shared --without-progs --enable-broken_linkergrep --enable-getcap --enable-ext-colors --enable-weak-symbols --enable-rpath

$prefix is our /opt/test  location with all our external libraries, although ncurses does not depend on any of those, another reason I love ncurses.

I kept ../lib so that while in test directory the library path would be the correct location to ncursesw.so*

gcc -O2 -fPIC -pipe -msse -msse2 -mfpmath=sse --param max-inline-insns-single=1200  -o color_content ../obj_s/color_content.o -Wl,-rpath,/usr/src/ncurses-6.1-20190706/lib  -L/opt/test/lib -rpath/opt/test/lib -L/opt/test/ssl/lib -rpath/opt/test/ssl/lib -L/opt/test/mysql/lib/mysql -rpath/opt/test/mysql/lib/mysql -L/opt/test/pgsql/lib -rpath/opt/test/pgsql/lib -L/opt/test/BerkeleyDB/lib -rpath/opt/test/BerkeleyDB/lib -I. -I. -I../test -DHAVE_CONFIG_H -DDATA_DIR=\"/opt/test/share\" -I. -I../include -I/opt/test/ssl/include -I/opt/test/BerkeleyDB/include -I/opt/test/include -I/opt/test/mysql/include -I/opt/test/mysql/include/mysql/server -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 -fPIC -pipe -msse -msse2 -mfpmath=sse --param max-inline-insns-single=1200  -fPIC -DPIC  `echo "-L../lib -lformw -lmenuw -lpanelw -lncursesw   " | sed -e 's/-lform.*-lpanel[^ ]*//'` -lutil -lm
ld: error: undefined symbol: extended_color_content
>>> referenced by color_content.c
>>>               ../obj_s/color_content.o:(ColorContent)

ld: error: undefined symbol: init_extended_color
>>> referenced by color_content.c
>>>               ../obj_s/color_content.o:(InitColor)
collect2: ld returned 1 exit status
make[1]: *** [color_content] Error 1
make[1]: Leaving directory `/usr/src/ncurses-6.1-20190706/test'
make: *** [all] Error 2
root@test-op01:/usr/src/ncurses-6.1-20190706# nm lib/libncursesw.so | grep extended_color_content
0002fdc0 T extended_color_content
0002fdb0 T extended_color_content_sp
root@test-op01:/usr/src/ncurses-6.1-20190706#

I don't know if I set that right, but I thought I would share what I tried this time around.

-Robert


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>
https://invisible-island.net
ftp://ftp.invisible-island.net


reply via email to

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