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]

libtool: static libs where shared can't be built


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a libtool library that has undefined symbols by design, so I need
to build it static.  But that seems to be impossible:

1) Simply omit '-no-undefined':

/bin/sh ../libtool --mode=link --tag=CXX g++  -Wno-long-long -Wundef
- -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -pipe
- -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common
- -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
- -DQT_NO_TRANSLATION    -o libkscreensaver.la -rpath /usr/lib -L/usr/lib
- -L/usr/lib/qt3/lib -L/usr/X11R6/lib    -R /usr/lib -R /usr/lib -R
/usr/lib/qt3/lib -R /usr/X11R6/lib -version-info 6:0:2 main.lo
kscreensaver.lo ../kio/libkio.la ../kdecore/libkdecore.la -lqt-mt  -lz
- -lpng -lz -lm -lXext -lX11  -lSM -lICE -lpthread
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
shared libraries
rm -fr  .libs/libkscreensaver.a .libs/libkscreensaver.la
.libs/libkscreensaver.lai
ar cru .libs/libkscreensaver.a
ranlib .libs/libkscreensaver.a
creating libkscreensaver.la
(cd .libs && rm -f libkscreensaver.la && ln -s ../libkscreensaver.la
libkscreensaver.la)

2) Add '-no-undefined -static' to LDFLAGS:

/bin/sh ../libtool --mode=link --tag=CXX g++  -Wno-long-long -Wundef
- -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -pipe
- -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common
- -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
- -DQT_NO_TRANSLATION    -o libkscreensaver.la -rpath /usr/lib -L/usr/lib
- -L/usr/lib/qt3/lib -L/usr/X11R6/lib    -R /usr/lib -R /usr/lib -R
/usr/lib/qt3/lib -R /usr/X11R6/lib -version-info 6:0:2 -no-undefined
- -static main.lo kscreensaver.lo ../kio/libkio.la
../kdecore/libkdecore.la -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM
- -lICE -lpthread
rm -fr  .libs/libkscreensaver.a .libs/libkscreensaver.la
.libs/libkscreensaver.lai
ar cru .libs/libkscreensaver.a
ranlib .libs/libkscreensaver.a
creating libkscreensaver.la
(cd .libs && rm -f libkscreensaver.la && ln -s ../libkscreensaver.la
libkscreensaver.la)

Either way I get empty static libs.  Is there any way to make this work?


Yaakov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDc8O7piWmPGlmQSMRAgPGAKC4Iwczk2Fb0HQGkJQjFm0ooLTk5wCglOF4
2cu01xX4Y+u7i1MB/pjXYH0=
=aINu
-----END PGP SIGNATURE-----

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


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