Ludovic Rousseau wrote on 03/16/06 12:33 AM:
On 16/03/06, Iain MacDonnell <[EMAIL PROTECTED]> wrote:
Yeah, I was just thinking along these lines, after sending that message.
I looked at the source for libmusclecard 1.2.9-beta7, and notice that it
does not have a tokenparser.l, so perhaps a new use of (f)lex was added
in a later version, and now that's somehow overriding the parser in
muscleTool (but not doing its job).
The problem is that both libmusclecard and muscleTool uses flex. The
linker is mixing the symbols from the two flex libraries and boom!
I think that visibility works (or doesn't work) differently with the
Sun compilers (vs. gcc). Maybe Dr. Ludovic can shed some light on this...
I don't have a SUN computer so it is not possible for me to make
tests. If you want to have a support for Solaris...
GNU ld also has a -B option:
-Bsymbolic
When creating a shared library, bind references to global symbols
to the definition within the shared library, if any. Normally, it
is possible for a program linked against a shared library to over-
ride the definition within the shared library. This option is only
meaningful on ELF platforms which support shared libraries.
You can try the attached patch. You will need to run bootstrap to
regenerate the configure script.
[snip]
Index: configure.in
===================================================================
--- configure.in (révision 1934)
+++ configure.in (copie de travail)
@@ -21,7 +21,7 @@ case "$host" in
;;
*-*-solaris*)
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
- LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
+ LDFLAGS="$LDFLAGS -B symbolic -L/usr/local/lib -R/usr/local/lib"
need_dash_r=1
;;
*-*-sunos4*)
1) This is pcsc-lite's configure.in. The problem is with libmusclecard
2) We can't just apply -Bsymbolic to LDFLAGS for everything - we can't
build regular dynamic executables with that:
configure:2361: cc -I/opt/ITmuscle/include -I/opt/ITmuscle/include/PCSC
-I/usr/sfw/include -L/opt/ITmuscle/lib -R/opt/ITmuscle/lib
-L/usr/sfw/lib -R/usr/sfw/lib -Bsymbolic conftest.c >&5
ld: fatal: option -Bsymbolic and building a dynamic executable are
incompatible
ld: fatal: Flags processing errors
I think the correct fix is to add "-Wl,-Bsymbolic" to
libmusclecard_la_LIBADD in libmusclecard-1.3.1/src/Makefile.am
Will test some more, and submit a patch if it continues to look good.
~Iain
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle