Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - ERROR ... requires a working dlopen(): (9 Items)
   
ERROR ... requires a working dlopen()  
Hello,

I wonder if someone had this before. I had a "working" version of the pkgsrc stuff, but the disk crashed and I had to 
start from scratch again...
With the "old" version I could install autoconf for instance, but the new version always complains about dlopen:

ERROR: libtool-base-1.5.24nb5 requires a working dlopen()

the same, with jpg, png libs and others.

any idea how to get rid of this errors?

Thanks!
Re: ERROR ... requires a working dlopen()  
dlopen is the dynamic libs loader - it *is* available in native QNX.

Here is the build process on my PC:

$ cd devel/libtool-base/
$ bmake clean && bmake build
===> Cleaning for libtool-base-1.5.24nb5
=> Bootstrap dependency digest>=20010302: found digest-20070803
=> Checksum SHA1 OK for libtool-1.5.24.tar.gz
=> Checksum RMD160 OK for libtool-1.5.24.tar.gz
===> Installing dependencies for libtool-base-1.5.24nb5
===> Overriding tools for libtool-base-1.5.24nb5
===> Extracting for libtool-base-1.5.24nb5
===> Patching for libtool-base-1.5.24nb5
=> Applying pkgsrc patches for libtool-base-1.5.24nb5
===> Creating toolchain wrappers for libtool-base-1.5.24nb5
===> Configuring for libtool-base-1.5.24nb5
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/pkg/bin/install-sh -c -o root -g root
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes

[... some more checks deleted ...]

checking how to recognize dependent libraries... match_pattern /lib[^/]+(\.so|S\.a)$

[... some more checks deleted ...]

checking whether the gcc linker (ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... QNX libc.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool

[... some more checks deleted ...]

Perhaps these info helps you to identify the check that is failing. Reading the shell code for this check may help to 
identify the problem.

Bye
Christian

Re: ERROR ... requires a working dlopen()  
Hello Christian,

calling bmake build after bmake clean in the libtool-base directory, the only message I get is:

> bmake build
=> Bootstrap dependency digest>=20010302: found digest-20070803
ERROR: This package has set PKG_FAIL_REASON:
ERROR: libtool-base-1.5.24nb5 requires a working dlopen().
*** Error code 1

Stop.
bmake: stopped in /home/dev/pkgsrc/HEAD/pkgsrc/devel/libtool-base

that's really bad, cause I know that dlopen is really working... I bootstraped the pkgsrc stuff again, though that did 
not help. 
any idea, how to get more information? 

Thank you!

Regards,
Matthias
Re: ERROR ... requires a working dlopen()  
On Mon, Apr 28, 2008 at 09:55:51AM -0400, Matthias Ecker wrote:
> Hello Christian,
> 
> calling bmake build after bmake clean in the libtool-base directory, the only message I get is:
> 
> > bmake build
> => Bootstrap dependency digest>=20010302: found digest-20070803
> ERROR: This package has set PKG_FAIL_REASON:
> ERROR: libtool-base-1.5.24nb5 requires a working dlopen().
> *** Error code 1
> 
> Stop.
> bmake: stopped in /home/dev/pkgsrc/HEAD/pkgsrc/devel/libtool-base
> 
> that's really bad, cause I know that dlopen is really working... I bootstraped the pkgsrc stuff again, though that did
 not help. 
> any idea, how to get more information? 
> 
> Thank you!

Not sure why it would throw this.  On my system
pkgsrc/mk/dlopen.builtin.mk detects that QNX has a
/usr/include/dlfcn.h and sets IS_BUILTIN.dl=  yes

-seanb
Re: ERROR ... requires a working dlopen()  
oh thanks! 

that was the right hint. For some reasosns, some includes were missing on the system. I have no idea, what went wrongm, 
but after setting it up once again, the libtool problem is gone!


Thank's for your help!!

Regards!
Matthias
Re: ERROR ... requires a working dlopen()  
On Mon, Apr 28, 2008 at 12:10:14PM -0400, Matthias Ecker wrote:
> oh thanks! 
> 
> that was the right hint. For some reasosns, some includes were missing on the system. I have no idea, what went wrongm
, but after setting it up once again, the libtool problem is gone!
> 

Scarry...

-seanb
Re: ERROR ... requires a working dlopen()  
> checking for dlopen... yes
> checking whether a program can dlopen itself... yes
> checking whether a statically linked program can dlopen itself... no
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> configure: creating libtool

I'm doing some research as to why creating an Apache loadable module of php is so difficult.   The problem seems to 
start when libtool decides that QNX does not support dynamic libraries calling dynamic libraries.  So instead it creates
 an apparently unusable static library.   In the warning message libtool indicates that this should not be a problem if 
the program uses dlopen().   Well, Apache has some kind of pre-processing program that it runs the library through, and 
this does not like the static library, not a surprise.

So right now I'm trying to understand how libtool works, and I think I now have to delve into Autoconf.  That's the 
program that creates "configure", right?  Which is how libtool gets this bogus info? 

I see from the above output that for this program, the configure script seems to figure out that QNX supports chained 
dynamic calling.   I haven't looked at whether the same results occur in the php configure.    

If anyone has run into any similar problem and has any words of wisdom to guide me, they would be appreciated.

BTW, I've given up on getting php to compile with pkgsrc as the current pkgsrc wrapper scripts do not handle the -R 
parameter properly.
Re: ERROR ... requires a working dlopen()  
 
> So right now I'm trying to understand how libtool works, and I think I now 
> have to delve into Autoconf.  That's the program that creates "configure", 
> right?  Which is how libtool gets this bogus info? 

The main part of libtool is the shell script ltmain.sh. This script must support QNX. The version in pkgsrc does support
 QNX. I do not know when/if upstream libtool does support QNX.

BUT sometimes the configure script does carry its own ltmain.sh. This may be an old version that does not support QNX. 
If this is the case it must be fixed to support QNX, too.


Re: ERROR ... requires a working dlopen()  
I have the pksrc libtool installed, but I'll check to make sure that
PHP is not using its own script.   Thanks for the direction.