[cfe-dev] unknown option: -soname

P karatheodory at gmail.com
Sat Oct 19 03:12:29 PDT 2013


Hi all,

I would really appreciate it if anyone could share some insights as to why
I get the following error

*ld: unknown option: -soname*
*clang: error: linker command failed with exit code 1 (use -v to see
invocation)*

I looked up the documentation of ld (here:
http://ftp.gnu.org/pub/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html) and
the option -soname does exist, however Apple's documentation (here:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ld.1.html)
does not include the option -soname.

I would like to know what changes are safe to make to the "buildit" file
that comes with libc++ so that the build goes through. Below, I am
attaching the output that shows up on the terminal screen.

Thanks in advance,

Drake




$ system_profiler SPSoftwareDataType

Software:

    System Software Overview:

*      System Version: Mac OS X 10.6.8 (10K549)*
      Kernel Version: Darwin 10.8.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Secure Virtual Memory: Enabled
      64-bit Kernel and Extensions: No

$ clang++ -v
*clang version 3.4 (trunk 192978) (llvm/trunk 192977)*
*Target: x86_64-apple-darwin10.8.0*
Thread model: posix

$ cd /usr/local/libcxx/lib
$ export TRIPLE=-apple-
$ sudo ./buildit
Password:
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/algorithm.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/bind.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/chrono.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include
../src/condition_variable.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/debug.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/exception.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/future.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/hash.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/ios.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/iostream.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/locale.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/memory.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/mutex.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/new.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/optional.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/random.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/regex.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/shared_mutex.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/stdexcept.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/string.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/strstream.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/system_error.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/thread.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/typeinfo.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/utility.cpp
+ for FILE in '../src/*.cpp'
+ clang++ -c -g -Os -fPIC -nostdinc++ -std=c++11 -fstrict-aliasing -Wall
-Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2
-Wstrict-overflow=4 -U__STRICT_ANSI__ -I../include ../src/valarray.cpp
+ case $TRIPLE in
+ clang algorithm.o bind.o chrono.o condition_variable.o debug.o
exception.o future.o hash.o ios.o iostream.o locale.o memory.o mutex.o
new.o optional.o random.o regex.o shared_mutex.o stdexcept.o string.o
strstream.o system_error.o thread.o typeinfo.o utility.o valarray.o -fPIC
-o libc++.so.1.0 -shared -nodefaultlibs -Wl,-soname,libc++.so.1 -lpthread
-lrt -lc -lstdc++ -nostdinc++ -std=c++11 -fstrict-aliasing -Wall -Wextra
-Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2 -Wstrict-overflow=4
-U__STRICT_ANSI__
clang: warning: argument unused during compilation: '-nostdinc++'
clang: warning: argument unused during compilation: '-std=c++11'
*ld: unknown option: -soname*
*clang: error: linker command failed with exit code 1 (use -v to see
invocation)*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131019/a237eed0/attachment.html>


More information about the cfe-dev mailing list