public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Compile gsoap as shared library - undefined references
Date: Mon, 01 Jul 2019 14:01:00 -0000	[thread overview]
Message-ID: <74570fa8-5ca7-0dbb-0112-5bc0d63ce680@gmail.com> (raw)
In-Reply-To: <CAC6GFCt6GQwHbMPE=P=yrPLfDyb-tGLYqA2Jgh+p=UVXDh+3SQ@mail.gmail.com>

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

      reply	other threads:[~2019-07-01 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  9:10 Wilhelm Eger
2019-07-01 12:47 ` Marco Atzeri
2019-07-01 13:38   ` Wilhelm Eger
2019-07-01 14:01     ` Marco Atzeri [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74570fa8-5ca7-0dbb-0112-5bc0d63ce680@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).