This is the mail archive of the
mailing list for the Cygwin project.
Re: Cannot compile UUID module
>> gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing
>> -pipe -I/
>> usr/local/include -DUSEIMPORTLIB -O3 -DVERSION=\"0.02\"
>> "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" UUID.c
>> rm -f blib/arch/auto/UUID/UUID.dll
>> g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols
>> 8608 -Wl,--enable-auto-image-base -L/usr/local/lib -L/usr/lib/e2fsprogs
>> atic -luuid -Wl,-Bdynamic UUID.o -o blib/arch/auto/UUID/UUID.dll
>> /usr/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.a \
>> UUID.o:UUID.c:(.text+0xe): undefined reference to `_uuid_generate'
> The ordering here is wrong. -luuid must come after UUID.o on the
> command line if the linker is to resolve uuid_* symbols in UUID.o from
> the -luuid library.
> With standard autoconf this is achieved by the convention that -l
> arguments must go in LIBS not LDFLAGS. I don't know if the perl system
> uses the same convention, but whatever it uses, the -luuid argument does
> not belong where it's currently being set.
Thank you so very much!
You were right, it is a solution to change to the right order by manually
g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols
-Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib
-L/usr/lib/e2fsprogs UUID.o -luuid -o blib/arch/auto/UUID/UUID.dll
So my next question is: Do you know what parameters are needed so that the
Makefile will be created with the right settings (without manually
executing g++ after the crashed first make)?
Because creating it with:
perl Makefile.PL LIBS=-L/usr/lib/e2fsprogs
results to the not functioning g++ line without ... -L/usr/lib/e2fsprogs
UUID.o -luuid ... (which was the reason for (unfortunately) false editing
of the Makefile).
At the beginning I can even see:
MakeMaker ARGV: (q[LIBS=-L/usr/lib/e2fsprogs])
# LIBS => [q[-luuid]]
But it does not seem to affect the g++ call.
And by the way, in the PostgreSQL posts dllwrap was used with
-Wl,-Bstatic,-luuid,-Bdynamic so when do I need the -Bstatic, -Bdynamic
and should I use it too?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html