Wireshark-bugs: [Wireshark-bugs] [Bug 2973] New: wireshark fails to build with --as-needed if lu

Date: Fri, 17 Oct 2008 02:47:29 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2973

           Summary: wireshark fails to build with --as-needed if lua
                    enabled.
           Product: Wireshark
           Version: 1.1.x (Experimental)
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: pva@xxxxxxxxxx


Created an attachment (id=2371)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=2371)
wireshark-1.1.1--as-needed.patch

Build Information:
This is build error in wireshark-1.1.1
--
/bin/sh ./libtool --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Werror
-DINET6 -D_U_="__attribute__((unused))" -O2 -pipe -march=athlon64
-mtune=athlon64 -msse3 -fomit-frame-pointer -ftracer -Wall -W
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign
-Wcast-align -I/usr/include -I/usr/local/include -pthread
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pixman-1     -Wl,--as-needed,--hash-style=gnu -L/usr/lib
-L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -o dftest dftest-dftest.o
dftest-util.o  wiretap/libwiretap.la wsutil/libwsutil.la epan/libwireshark.la
-dlopen plugins/agentx/agentx.la -dlopen plugins/artnet/artnet.la -dlopen
plugins/asn1/asn1.la -dlopen plugins/ciscosm/ciscosm.la -dlopen
plugins/docsis/docsis.la -dlopen plugins/enttec/enttec.la -dlopen
plugins/ethercat/ethercat.la -dlopen plugins/giop/cosnaming.la -dlopen
plugins/giop/coseventcomm.la -dlopen plugins/gryphon/gryphon.la -dlopen
plugins/infiniband/infiniband.la -dlopen plugins/irda/irda.la -dlopen
plugins/lwres/lwres.la -dlopen plugins/m2m/m2m.la -dlopen plugins/mate/mate.la
-dlopen plugins/opcua/opcua.la -dlopen plugins/opsi/opsi.la -dlopen
plugins/pcli/pcli.la -dlopen plugins/profinet/profinet.la -dlopen
plugins/rlm/rlm.la -dlopen plugins/rtnet/rtnet.la -dlopen plugins/rudp/rudp.la
-dlopen plugins/sbus/sbus.la -dlopen plugins/sercosiii/sercosiii.la -dlopen
plugins/stats_tree/stats_tree.la -dlopen plugins/unistim/unistim.la -dlopen
plugins/v5ua/v5ua.la -dlopen plugins/wimax/wimax.la -lpcre -Wl,--export-dynamic
-lgmodule-2.0 -lglib-2.0   -lm -lpcap -lcares -L/usr/lib64 -Wl,-rpath
-Wl,/usr/lib64 -DINET6 -D_U_="__attribute__((unused))" -O2 -pipe
-march=athlon64 -mtune=athlon64 -msse3 -fomit-frame-pointer -ftracer -Wall -W
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign
-Wcast-align -I/usr/include -I/usr/local/include -pthread
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pixman-1 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -L/usr/lib64
-lgcrypt -lgpg-error -L/usr/lib64 -lgnutls -L/usr/lib64 -ltasn1 -L/usr/lib64
-lgcrypt -lgpg-error -L/usr/lib -lsmi -lz
libtool: link: rm -f .libs/dftest.nm .libs/dftest.nmS .libs/dftest.nmT
libtool: link: (cd .libs && x86_64-pc-linux-gnu-gcc -DINET6
-D_U_="__attribute__((unused))" -O2 -pipe -march=athlon64 -mtune=athlon64
-msse3 -fomit-frame-pointer -ftracer -Wall -W -Wdeclaration-after-statement
-Wendif-labels -Wpointer-arith -Wno-pointer-sign -Wcast-align -I/usr/include
-I/usr/local/include -pthread -I/usr/include/gtk-2.0
-I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -c
-fno-builtin "dftestS.c")
libtool: link: rm -f ".libs/dftestS.c" ".libs/dftest.nm" ".libs/dftest.nmS"
".libs/dftest.nmT"
libtool: link: x86_64-pc-linux-gnu-gcc -Werror -DINET6
"-D_U_=__attribute__((unused))" -O2 -pipe -march=athlon64 -mtune=athlon64
-msse3 -fomit-frame-pointer -ftracer -Wall -W -Wdeclaration-after-statement
-Wendif-labels -Wpointer-arith -Wno-pointer-sign -Wcast-align -I/usr/include
-I/usr/local/include -pthread -I/usr/include/gtk-2.0
-I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1
-Wl,--as-needed -Wl,--hash-style=gnu -o .libs/dftest dftest-dftest.o
dftest-util.o .libs/dftestS.o -Wl,--export-dynamic -Wl,-rpath -Wl,/usr/lib64
-DINET6 "-D_U_=__attribute__((unused))" -O2 -pipe -march=athlon64
-mtune=athlon64 -msse3 -fomit-frame-pointer -ftracer -Wall -W
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign
-Wcast-align -I/usr/include -I/usr/local/include -pthread
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pixman-1  -L/usr/lib -L/usr/local/lib
wiretap/.libs/libwiretap.so wsutil/.libs/libwsutil.so
epan/.libs/libwireshark.so -L/usr/lib64 /usr/lib64//liblua.so
/var/tmp/portage/net-analyzer/wireshark-1.1.1/work/wireshark-1.1.1/wsutil/.libs/libwsutil.so
/usr/lib64/libpcre.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libglib-2.0.so
-lm -lpcap /usr/lib64/libcares.so -lrt -lkrb5 -lk5crypto -lcom_err -lresolv
-ldl /usr/lib64/libgnutls.so /usr/lib64/libtasn1.so /usr/lib64/libgcrypt.so
/usr/lib64/libgpg-error.so /usr/lib64/libsmi.so -lz -pthread -Wl,-rpath
-Wl,/usr/lib64/
epan/.libs/libwireshark.so: undefined reference to `wtap_dump_can_write_encap'
epan/.libs/libwireshark.so: undefined reference to `wtap_strerror'
epan/.libs/libwireshark.so: undefined reference to `wtap_dump_close'
epan/.libs/libwireshark.so: undefined reference to `wtap_file_type_string'
epan/.libs/libwireshark.so: undefined reference to `wtap_encap_short_string'
epan/.libs/libwireshark.so: undefined reference to `wtap_dump'
epan/.libs/libwireshark.so: undefined reference to `wtap_dump_flush'
epan/.libs/libwireshark.so: undefined reference to `wtap_dump_open'
collect2: ld returned 1 exit status
make[2]: *** [dftest] Error 1
make[2]: Leaving directory
`/var/tmp/portage/net-analyzer/wireshark-1.1.1/work/wireshark-1.1.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/net-analyzer/wireshark-1.1.1/work/wireshark-1.1.1'
make: *** [all] Error 2



wslua still depends on libwiretap... Attached patch fixes the issue. But may be
you'll find better solution as AFAIK you don't want to link libwirshark with
libwiretap...


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.