delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/07/01/09:42:44

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-type:content-transfer-encoding;
q=dns; s=default; b=q+lhXySFcX3AE6OKOqFO1fFAjF3IB/CM5mV9jLAn7dh
YhMKWyQTVCr2K9Hbmp/nnLYAazfvwQiaUrbTt72lMYVKL0ZNESbtfWl4EDWvknOo
u5dEiW5OznRlSo6340hM7edRRlwXxfn90X75A18n/U6KwK17w417csClRH4oiW0o
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-type:content-transfer-encoding;
s=default; bh=v12liWZcrnEp3/VVJZHF7BPcn9A=; b=wSIOmAh0+srF6E6yG
kMyLFCRiHfy+kEpQROjEB8325KcdCh4W0e33gktUm1I1YfQaSNva5ASECT/AAm07
O6ue0F/QwVTQ3rltnk3f2DNC6duM91uEGmtF6jNBNgMySc4aL5LAi+XjioJuUEnF
vRD/xLkyha2cMEx5VGiGkiip9w=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=auf, diese
X-HELO: mail-qt1-f196.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=dOdZjZs9NPVvkrQQ5vU1bIABAKaZVcw2nO7U1SJ69ac=; b=PCGq8jrMUj6qkP6/2TbcEU+MsofDA2/40SDKmz0myVD/DH7myyGw5PDV/iIgbAa3Wc lai9IqnNt1nhniN6UBa84Un4vdTZVYHoqGTJOCAOIDpqTYnhsu1ZF0AJzqi7TypjLNOl mLwQrjhTsn0svFWochyQgGGj2M/3+xgyY9yIfXATf4IgvE9AFAi6k06pUx8fFznqqYyY R7eCv3AEP0VICECEkzsPTpQ6LC8XV671AZWqP+j+XOE1q8sKwdyuO/IXYKMJU/lfJUKw 1cRPFmt8k5jrLLpOlQ5UaguQJyqd11Y0Hj0QbxTA8ZXE1+oP7xwGY7SeDogTXUCTy49l gJYw==
MIME-Version: 1.0
References: <CAC6GFCs8_My9Gp_9DQmRt2AQ0zOt4kvgFUNatz5Z2HEA6UDswQ AT mail DOT gmail DOT com> <378469b3-97de-b0bb-6664-d6f9db0dc8ee AT gmail DOT com>
In-Reply-To: <378469b3-97de-b0bb-6664-d6f9db0dc8ee@gmail.com>
From: Wilhelm Eger <wilhelm DOT eger AT gmail DOT com>
Date: Mon, 1 Jul 2019 15:38:27 +0200
Message-ID: <CAC6GFCt6GQwHbMPE=P=yrPLfDyb-tGLYqA2Jgh+p=UVXDh+3SQ@mail.gmail.com>
Subject: Re: Compile gsoap as shared library - undefined references
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x61DgTFo025932

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?


Am Mo., 1. Juli 2019 um 14:47 Uhr schrieb Marco Atzeri <marco DOT atzeri AT gmail DOT com>:
>
> Am 01.07.2019 um 11:09 schrieb Wilhelm Eger:
> > Hello there!
> >
> > This is my first post to the cygwin mailing list. Hence, I hope, this
> > is the right place to post my problem. It seems to be a mixture of
> > packaging / compiling / linking / porting problem. However, I was
> > thinking that starting in this list is more appropriate than in e.g.
> > the packagers list.
> >
> > I would like to compile gsoap as a shared library to use it in another
> > project (kopano-core). Please note that static linking works fine.
> > However, I would like to achieve a shared library of gsoap. gsoap
> > itself provides only static compilation. However, the major
> > distributions deliver it as shared library. That's where I have
> > started:
> >
> > gSoap: https://sourceforge.net/projects/gsoap2/
> > OpenSuse Patches for shared library:
> > https://build.opensuse.org/package/show/home:mrbadguy/gsoap
> >
> > Please find my respective patches plus cygport package attached to this mail.
> >
> > Unfortunately, the package does not build. In fact, it fails at
> > linking the shared library due to undefined references. Please not
> > that I have updated the OpenSuse patches by adding '-no-undefined' to
> > the libtool chain. Further, I have added 'mcmodel=large' to the CFLAGS
> > to work around relocation problems.
> >
> > Still, undefined references are found:
>
> > /bin/sh ../libtool  --tag=CC   --mode=link gcc      -mcmodel=large
> > -DCYGWIN -ggdb -O2 -pipe -Wall -Werror=format-security
> > -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
> > --param=ssp-buffer-size=4 -D_GNU_SOURCE -Wno-attributes
> > -fdebug-prefix-map=/home/eger/gsoap-shared/gsoap-2.8.84-1.x86_64/build=/usr/src/debug/gsoap-2.8.84-1
> > -fdebug-prefix-map=/home/eger/gsoap-shared/gsoap-2.8.84-1.x86_64/src/gsoap-2.8=/usr/src/debug/gsoap-2.8.84-1
> > -release 2.8.84 -Wl,--version-script=gsoap.sym -no-undefined     -o
> > libgsoap.la -rpath /usr/lib libgsoap_la-stdsoap2.lo libgsoap_la-dom.lo
> > libtool: link: gcc -shared  .libs/libgsoap_la-stdsoap2.o
> > .libs/libgsoap_la-dom.o    -mcmodel=large -ggdb -O2
> > -fstack-protector-strong -Wl,--version-script=gsoap.sym   -o
> > .libs/cyggsoap-2-8-84.dll -Wl,--enable-auto-image-base -Xlinker
> > --out-implib -Xlinker .libs/libgsoap.dll.a
> > .libs/libgsoap_la-stdsoap2.o:stdsoap2.c:(.rdata$.refptr.soap_fault_detail[.refptr.soap_fault_detail]+0x0):
> > undefined reference to `soap_fault_detail'
>
> which library provide soap_fault_detail ?
>
> Maybe the package will build multiple dlls and you need to add
> the dependencies ?
>
> Marco
>
>
> ---
> 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
>

--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019