This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compile gsoap as shared library - undefined references


Am 01.07.2019 um 15:38 schrieb Wilhelm Eger:
Hi Marco,

I think this is the actual problem. This might answer your question
(posted on stackoverflow for the same question):

The soap_faultcode and other functions are not defined in stdsoap2.c but are referenced in stdsoap2.c and should be linked with the soapcpp2-generated code e.g. soapC.c that define these functions.
These functions depend on the way SOAP_ENV__Fault struct is declared (in the .h file for soapcpp2) and therefore these functions cannot be integrated and fixed in the stdsoap2.c library since the struct
may change per application (e.g. SOAP_ENV_Detail may have additional struct members).

Hence, this seems to be valied for all undefined references.

However, I have tried compiling the package modified as set out above
(without further adaption to cygwin) on archlinux and it compiles
fine!

Compilation on archlinux:

make  all-recursive
make[1]: Entering directory '/home/office2pdf/test/gsoap-2.8'
Making all in .
make[2]: Entering directory '/home/office2pdf/test/gsoap-2.8'
make[2]: Leaving directory '/home/office2pdf/test/gsoap-2.8'
Making all in gsoap
make[2]: Entering directory '/home/office2pdf/test/gsoap-2.8/gsoap'
ln -s -f ../gsoap/stdsoap2.cpp stdsoap2_cpp.cpp
ln -s -f ../gsoap/dom.cpp dom_cpp.cpp
ln -s -f ../gsoap/stdsoap2.cpp stdsoap2_ck.c
ln -s -f ../gsoap/stdsoap2.cpp stdsoap2_ck_cpp.cpp
ln -s -f ../gsoap/stdsoap2.cpp stdsoap2_ssl.c
ln -s -f ../gsoap/stdsoap2.cpp stdsoap2_ssl_cpp.cpp
make  all-recursive
make[3]: Entering directory '/home/office2pdf/test/gsoap-2.8/gsoap'
Making all in .
make[4]: Entering directory '/home/office2pdf/test/gsoap-2.8/gsoap'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I..       -DWITH_IPV6  -DLINUX -g -O2 -MT libgsoap_la-stdsoap2.lo -MD
-MP -MF .deps/libgsoap_la-stdsoap2.Tpo -c -o libgsoap_la-stdsoap2.lo
`test -f 'stdsoap2.c' || echo './'`stdsoap2.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DWITH_IPV6 -DLINUX -g
-O2 -MT libgsoap_la-stdsoap2.lo -MD -MP -MF
.deps/libgsoap_la-stdsoap2.Tpo -c stdsoap2.c  -fPIC -DPIC -o
.libs/libgsoap_la-stdsoap2.o
mv -f .deps/libgsoap_la-stdsoap2.Tpo .deps/libgsoap_la-stdsoap2.Plo
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I..       -DWITH_IPV6  -DLINUX -g -O2 -MT libgsoap_la-dom.lo -MD -MP
-MF .deps/libgsoap_la-dom.Tpo -c -o libgsoap_la-dom.lo `test -f
'dom.c' || echo './'`dom.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DWITH_IPV6 -DLINUX -g
-O2 -MT libgsoap_la-dom.lo -MD -MP -MF .deps/libgsoap_la-dom.Tpo -c
dom.c  -fPIC -DPIC -o .libs/libgsoap_la-dom.o
mv -f .deps/libgsoap_la-dom.Tpo .deps/libgsoap_la-dom.Plo
/bin/sh ../libtool  --tag=CC   --mode=link gcc    -DWITH_IPV6  -DLINUX
-g -O2 -release 2.8.84 -Wl,--version-script=gsoap.sym  -o libgsoap.la
-rpath /usr/local/lib libgsoap_la-stdsoap2.lo libgsoap_la-dom.lo
libtool: link: gcc -shared  -fPIC -DPIC  .libs/libgsoap_la-stdsoap2.o
.libs/libgsoap_la-dom.o    -g -O2 -Wl,--version-script=gsoap.sym
-Wl,-soname -Wl,libgsoap-2.8.84.so -o .libs/libgsoap-2.8.84.so
libtool: link: (cd ".libs" && rm -f "libgsoap.so" && ln -s
"libgsoap-2.8.84.so" "libgsoap.so")
libtool: link: ( cd ".libs" && rm -f "libgsoap.la" && ln -s
"../libgsoap.la" "libgsoap.la" )
[...]

nm --undefined gsoap/.libs/libgsoap.so  | grep soap
                  U soap_delelement
                  U soap_dupelement
                  U soap_fault_detail
                  U soap_fault_string
                  U soap_fault_subcode
                  U soap_faultcode
                  U soap_faultdetail
                  U soap_faultstring
                  U soap_faultsubcode
                  U soap_getelement
                  U soap_getfault
                  U soap_getheader
                  U soap_markelement
                  U soap_putelement
                  U soap_putfault
                  U soap_putheader
                  U soap_serializefault
                  U soap_serializeheader

Why does the code compile on linux, but not on cygwin and how to make
this happen on cygwin?



post bottom and trim in this mailing list, please.

Windows and some other platforms do NOT allow undefined at link time,
linux and some other Unix (not all) are ignoring the issue.

IMHO this source package is bad defined and need modifications, so you
need to work with upstream developers.



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]