bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtool issue with latest Sun cc compiler on Linux


From: Terry D. Dontje
Subject: libtool issue with latest Sun cc compiler on Linux
Date: Fri, 16 Feb 2007 07:55:10 -0500
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050930)

In compiling OMPI 1.2 with Sun cc compiler on Linux I am getting the following on result from make:

libtool: link: suncc -G class/.libs/opal_free_list.o class/.libs/opal_hash_table.o class/.libs/opal_list.o class/.libs/opal_object.o class/.libs/opal_atomic_lifo.o class/.libs/opal_value_array.o memoryhooks/.libs/memory.o runtime/.libs/opal_progress.o runtime/.libs/opal_finalize.o runtime/.libs/opal_init.o runtime/.libs/opal_params.o threads/.libs/condition.o threads/.libs/mutex.o threads/.libs/thread.o -Wl,--whole-archive,libltdl/.libs/libltdlc.a,asm/.libs/libasm.a,event/.libs/libevent.a,mca/base/.libs/libmca_base.a,util/.libs/libopalutil.a,mca/backtrace/.libs/libmca_backtrace.a,mca/backtrace/execinfo/.libs/libmca_backtrace_execinfo.a,mca/maffinity/.libs/libmca_maffinity.a,mca/memcpy/.libs/libmca_memcpy.a,mca/memory/.libs/libmca_memory.a,mca/memory/ptmalloc2/.libs/libmca_memory_ptmalloc2.a,mca/paffinity/.libs/libmca_paffinity.a,mca/timer/.libs/libmca_timer.a,mca/timer/linux/.libs/libmca_timer_linux.a -Wl,--no-whole-archive /dev/null -ldl -lnsl -lutil -lm -lc -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -mt -Wl,-soname -Wl,libopen-pal.so.0 -o .libs/libopen-pal.so.0.0.0
/dev/null: file not recognized: File truncated


I believe the issue is the resultant /dev/null added at the end. So I manually tried the following:


address@hidden:~/tmp/compissue> cc -mt -c foo.c -KPIC -DPIC -o foo.o address@hidden:~/tmp/compissue> ar cru libtest.a foo.o address@hidden:~/tmp/compissue> cc -G -Wl,--whole-archive,libtest.a -Wl,--no-whole-archive -lnsl -lutil -lm -lc -mt -Wl,-soname -Wl,libtest.so.0 -o libtest.so.0.0 /dev/null
/dev/null: file not recognized: File truncated

Same error as the above.  Now let's remove the /dev/null...

address@hidden:~/tmp/compissue> cc -G -Wl,--whole-archive,libtest.a -Wl,--no-whole-archive -lnsl -lutil -lm -lc -mt -Wl,-soname -Wl,libtest.so.0 -o libtest.so.0.0
usage: cc [ options] files.  Use 'cc -flags' for details

Oops, no input to compile (which is probably why /dev/null is used). Ok, let's now add a .o...

address@hidden:~/tmp/compissue> cc -mt -c bar.c  -KPIC -DPIC -o bar.o
address@hidden:~/tmp/compissue> cc -G -Wl,--whole-archive,libtest.a -Wl,--no-whole-archive -lnsl -lutil -lm -lc -mt -Wl,-soname -Wl,libtest.so.0 -o libtest.so.0.0 bar.o

And this works. So I am not sure if this might be a compiler change for linux or what. So other than providing a dummy.c I am not sure what more libtool could do. I will be passing this by our compiler guys too to see if they think /dev/null was originally supported
and removed for some reason.

Note the following is my Sun CC version info:
cc: Sun C 5.9 Linux_i386 Build35_2 2006/12/04

--td






reply via email to

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