public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* libtool issue on shared lib
@ 2012-03-23 11:06 marco atzeri
  2012-03-23 11:17 ` Peter Rosin
  0 siblings, 1 reply; 3+ messages in thread
From: marco atzeri @ 2012-03-23 11:06 UTC (permalink / raw)
  To: cygwin

I am trying to adapt socketxx to cygwin
(http://www.linuxhacker.at/socketxx)

In addition to a lot of other problems, I have a puzzling libtool issue


make[2]: Entering directory 
`/pub/devel/gdcm/socket++-1.12.13_build/socket++'
/bin/sh ../libtool --tag=CXX    --mode=link g++   -Wall -g -O2 
-version-info 1:2:0  -o libsocket++.la -rpath /usr/local/lib 
sockstream.lo sockinet.lo sockunix.lo  pipestream.lo fork.lo protocol.lo 
echo.lo smtp.lo ftp.lo  sig.lo
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin 
shared libraries

but

g++   -Wall -g -O2 -shared  -o cygsocket++-0.dll 
-Wl,--out-implib=libsocket++.dll.a sockstream.o sockinet.o sockunix.o 
pipestream.o fork.o protocol.o echo.o smtp.o ftp.o  sig.o
Creating library file: libsocket++.dll.a

$ cygcheck ./cygsocket++-0.dll
E:\cygwin\pub\devel\gdcm\socket++-1.12.13_build\socket++\cygsocket++-0.dll
   E:\cygwin\bin\cygwin1.dll
[cut]
   E:\cygwin\bin\cyggcc_s-1.dll
   E:\cygwin\bin\cygstdc++-6.dll


So where is the undefined symbol ??


I am already using "autoreconf -f -i" and the libtool
seems equivalent to what is working for any other package

adding LT_INIT([dlopen win32-dll shared])
to configure.in had no effect

and the  Makefile.am is very basic
---------------------------------------------
INCLUDES = -I$(top_srcdir) -I$(top_builddir)

lib_LTLIBRARIES = libsocket++.la
libsocket___la_SOURCES = sockstream.cpp sockstream.h \
         sockinet.cpp sockinet.h \
         sockunix.cpp sockunix.h\
         pipestream.cpp pipestream.h \
         fork.cpp fork.h \
         protocol.cpp protocol.h \
         echo.cpp echo.h \
         smtp.cpp smtp.h \
         ftp.cpp ftp.h \
         sig.cpp sig.h

libsocketincludedir=$(includedir)/socket++
libsocketinclude_HEADERS = \
         sockstream.h \
         sockinet.h \
         sockunix.h\
         pipestream.h \
         fork.h \
         protocol.h \
         echo.h \
         smtp.h \
         ftp.h \
         sig.h
libsocket___la_LDFLAGS = -version-info @LIBSOCKET_SO_VERSION@
-------------------------------------------------

Any idea about what I should look for ?

Marco


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libtool issue on shared lib
  2012-03-23 11:06 libtool issue on shared lib marco atzeri
@ 2012-03-23 11:17 ` Peter Rosin
  2012-03-23 11:18   ` Peter Rosin
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Rosin @ 2012-03-23 11:17 UTC (permalink / raw)
  To: cygwin

marco atzeri skrev 2012-03-23 12:05:
> I am trying to adapt socketxx to cygwin
> (http://www.linuxhacker.at/socketxx)
> 
> In addition to a lot of other problems, I have a puzzling libtool issue
> 
> 
> make[2]: Entering directory `/pub/devel/gdcm/socket++-1.12.13_build/socket++'
> /bin/sh ../libtool --tag=CXX    --mode=link g++   -Wall -g -O2 -version-info 1:2:0  -o libsocket++.la -rpath /usr/local/lib sockstream.lo sockinet.lo sockunix.lo  pipestream.lo fork.lo protocol.lo echo.lo smtp.lo ftp.lo  sig.lo
> libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries
> 
> but
> 
> g++   -Wall -g -O2 -shared  -o cygsocket++-0.dll -Wl,--out-implib=libsocket++.dll.a sockstream.o sockinet.o sockunix.o pipestream.o fork.o protocol.o echo.o smtp.o ftp.o  sig.o
> Creating library file: libsocket++.dll.a
> 
> $ cygcheck ./cygsocket++-0.dll
> E:\cygwin\pub\devel\gdcm\socket++-1.12.13_build\socket++\cygsocket++-0.dll
>   E:\cygwin\bin\cygwin1.dll
> [cut]
>   E:\cygwin\bin\cyggcc_s-1.dll
>   E:\cygwin\bin\cygstdc++-6.dll
> 
> 
> So where is the undefined symbol ??

Libtool want's the package to declare that it does not have any
undefined symbols.  But if this package does have undefined
symbols in it, then it can't be build (easily) on Cygwin.

> I am already using "autoreconf -f -i" and the libtool
> seems equivalent to what is working for any other package
> 
> adding LT_INIT([dlopen win32-dll shared])
> to configure.in had no effect
> 
> and the  Makefile.am is very basic
> ---------------------------------------------
> INCLUDES = -I$(top_srcdir) -I$(top_builddir)
> 
> lib_LTLIBRARIES = libsocket++.la
> libsocket___la_SOURCES = sockstream.cpp sockstream.h \
>         sockinet.cpp sockinet.h \
>         sockunix.cpp sockunix.h\
>         pipestream.cpp pipestream.h \
>         fork.cpp fork.h \
>         protocol.cpp protocol.h \
>         echo.cpp echo.h \
>         smtp.cpp smtp.h \
>         ftp.cpp ftp.h \
>         sig.cpp sig.h
> 
> libsocketincludedir=$(includedir)/socket++
> libsocketinclude_HEADERS = \
>         sockstream.h \
>         sockinet.h \
>         sockunix.h\
>         pipestream.h \
>         fork.h \
>         protocol.h \
>         echo.h \
>         smtp.h \
>         ftp.h \
>         sig.h
> libsocket___la_LDFLAGS = -version-info @LIBSOCKET_SO_VERSION@
> -------------------------------------------------
> 
> Any idea about what I should look for ?

You can try to feed -no-undefined to libtool when it links, telling
libtool that the library does not have any undefined symbols,
libtool will then at least try to create a DLL.  I would add it
to libsocket___la_LDFLAGS.

Cheers,
Peter


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libtool issue on shared lib
  2012-03-23 11:17 ` Peter Rosin
@ 2012-03-23 11:18   ` Peter Rosin
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Rosin @ 2012-03-23 11:18 UTC (permalink / raw)
  To: cygwin

Peter Rosin skrev 2012-03-23 12:16:
> Libtool want's the package to declare that it does not have any
wants
> undefined symbols.  But if this package does have undefined
> symbols in it, then it can't be build (easily) on Cygwin.
built

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-23 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 11:06 libtool issue on shared lib marco atzeri
2012-03-23 11:17 ` Peter Rosin
2012-03-23 11:18   ` Peter Rosin

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