I am on a FreeBSD system trying to build a piece of software that I wrote. I had built it in the past but recently reinstalled FreeBSD. I am not sure what is going on. The software depends on and wxgtk2.8.
Using g++:
$ make
g++ -c `wx-config --cxxflags` -DPIXMAPDIR="\"/usr/local/share/pixmaps\"" -DABCDIR="\"/usr/local/share/myabcs\"" -Iinclude src/gnrcabt.cpp
g++ -c `wx-config --cxxflags` -DPIXMAPDIR="\"/usr/local/share/pixmaps\"" -DABCDIR="\"/usr/local/share/myabcs\"" -Iinclude src/abc.cpp
g++ -c `wx-config --cxxflags` -DPIXMAPDIR="\"/usr/local/share/pixmaps\"" -DABCDIR="\"/usr/local/share/myabcs\"" -Iinclude src/main.cpp
Making project myabcs version 0.4.5.
g++ -v -s `wx-config --libs` gnrcabt.o abc.o main.o -o myabcs
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/lto-wrapper
Target: x86_64-portbld-freebsd10.1
Configured with: ./../gcc-4.8.4/configure --disable-bootstrap --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc48
--libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection'
--with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar --enable-languages=c,c++,objc,fortran,java --prefix=/usr/local
--mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=x86_64-portbld-freebsd10.1
Thread model: posix
gcc version 4.8.4 (FreeBSD Ports Collection)
COMPILER_PATH=/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/:/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/:/usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/:/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/:/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/
LIBRARY_PATH=/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/:/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-s' '-L/usr/local/lib' '-pthread' '-fstack-protector' '-L/usr/local/lib' '-o' 'myabcs' '-shared-libgcc'
'-mtune=generic' '-march=x86-64' /usr/local/libexec/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/collect2 --eh-frame-hdr -V
-dynamic-linker /libexec/ld-elf.so.1 -o myabcs -s /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/crtbegin.o
-L/usr/local/lib -L/usr/local/lib -L/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4
-L/usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/../../.. -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8
-lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
gnrcabt.o abc.o main.o -lstdc++ -lm -lssp_nonshared -lgcc_s -lgcc -lpthread -lc -lgcc_s
-lgcc /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd10.1/4.8.4/crtend.o /usr/lib/crtn.o
GNU ld (GNU Binutils) 2.25
Supported emulations:
elf_x86_64_fbsd
elf_i386_fbsd
elf_x86_64
elf_i386
elf_l1om
elf_l1om_fbsd
elf_k1om
elf_k1om_fbsd
Using clang:
$ make CC=clang
clang -c `wx-config --cxxflags` -DPIXMAPDIR="\"/usr/local/share/pixmaps\"" -DABCDIR="\"/usr/local/share/myabcs\"" -Iinclude src/gnrcabt.cpp
clang -c `wx-config --cxxflags` -DPIXMAPDIR="\"/usr/local/share/pixmaps\"" -DABCDIR="\"/usr/local/share/myabcs\"" -Iinclude src/abc.cpp
clang -c `wx-config --cxxflags` -DPIXMAPDIR="\"/usr/local/share/pixmaps\"" -DABCDIR="\"/usr/local/share/myabcs\"" -Iinclude src/main.cpp
Making project myabcs version 0.4.5.
clang -v -s `wx-config --libs` gnrcabt.o abc.o main.o -o myabcs
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.1
Thread model: posix
Selected GCC installation:
"/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o myabcs /usr/lib/crt1.o
/usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/local/lib -L/usr/local/lib -L/usr/lib -s -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8
-lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8
-lwx_baseu_net-2.8 -lwx_baseu-2.8 gnrcabt.o abc.o main.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed
-lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
/usr/bin/ld: //usr/lib/libc++.so.1: invalid DSO for symbol `_ZdlPv' definition
//usr/lib/libc++.so.1: could not read symbols: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Not sure what is going on. I'll have to see if I can compile another program with wxgtk.