[ale] problem with libraries

Joe jknapka at mindspring.com
Mon Jun 2 22:31:41 EDT 1997


The original problem is fixed when you link libdl.so:

>I'm trying to get the pilot-sync package to compile under
>linux. Currently, when I try to make it, the following happens:
>
>spoo:~/incoming/pilot/pilot-sync.0.1.4$ make
>gcc -o pilot-sync pilot-sync.o tasks.o pilot_connect.o comm.o util.o default.o -L/usr/local/lib -L/lib  -lpisock 

Here, pilot-sync has failed to link.

>tasks.o: In function `get_registrations':

((( lots of unresolved externals )))

>make: *** [pilot-sync] Error 1
>
>I believe that the missing functions are defined in /lib/libdl.so, but
>when I add -ldl to the command line, I get:

So you link with libdl.so, and...

>gcc -o pilot-sync pilot-sync.o tasks.o pilot_connect.o comm.o util.o
> default.o -L/usr/local/lib -L/lib  -ldl -lpisock 

Here, pilot-sync has linked successfully, and you have a (presumably
fully-functional) pilot-sync executable. But then things get hairy:

>gcc   default.o pilot-sync   -o default

We're now trying to build an executable by linking default.o to the
LINKED EXECUTABLE pilot-sync! This is a really bad idea, because now
when we try to link with the default libraries (among them,
crt<something>.o, which contains the executable startup code),
everthing goes to hell because all those entry points already exist in
pilot-sync. To wit:

>pilot-sync(.data+0x0): multiple definition of `__environ'
>/usr/lib/crt1.o(.data+0x0): first defined here

... remaining errors snipped...

This looks to me like a bad Makefile configuration. I bet default.o is
really s'posed to be linked with pilot-sync.o, not pilot-sync.

BTW, what the heck is pilot-sync?


--Joe (not the same joe, however).

>
>--joe
>
>p.s. I'm running RedHat 4.0, if it matters. 






More information about the Ale mailing list