Re: Pike on OpenBSD

Bernd Schoeller <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
On 03/01/17 09:14, Henrik Grubbström wrote:
> Ah, the configure output explains it;
>
>> checking SO... so
>> checking LDSHARED... gcc -Wl,-Bshareable
>> checking CCSHARED... checking -fPIC... yes
>>  -fPIC
>> checking LINKFORSHARED... -Wl,-E
>> checking -static-libgcc... yes
>> checking if dynamic loading works... no
>                                        ^^
>
> So for some reason dlopen() et al don't work as intended, and thus
> you get a pike with only static modules, which means that the main
> pike binary won't get compiled until after post_modules.
>
> /home/schoelle/Code/Pike-v8.0.388/build/openbsd-6.0-amd64/config.log
> should give a hint about why dlopen() failed.

Ok - that explains it:

configure:68713: checking for dlopen in -ldl
configure:68738: 
/home/schoelle/Code/Pike-v8.0.388/build/openbsd-6.0-amd64/smartlink gcc 
-o conftest -g  -fvisibility=hidden -O3 -pipe -ggdb -funswitch-loops 
-I/usr/local/include -I/usr/X11R6/include 
-I/home/schoelle/Code/Pike-v8.0.388/src 
-I/home/schoelle/Code/Pike-v8.0.388/build/openbsd-6.0-amd64 
-L/usr/local/lib -R/usr/local/lib -L/usr/X11R6/lib -R/usr/X11R6/lib 
-L/usr/lib/gcc-lib/amd64-unknown-openbsd6.0/4.2.1 conftest.c -ldl  -lm  >&5
/usr/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status

Looks like -ldl is not needed on OpenBSD. The functions are available as 
documented here:

http://man.openbsd.org/OpenBSD-current/man3/dlfcn.3

I have removed the inclusion of -ldl into LIBS in the configure script.

Now, things are very messy with lots of errors. Will continue to dig 
further.

Current output is here:

https://www.fams.de/bernte/gmake-out2.txt
https://www.fams.de/bernte/config.log.txt

Thanks,
Bernd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.