RE: [Quickfix-developers] Solaris compile problems
Brought to you by:
orenmnero
From: Peterson, K. <kri...@rb...> - 2004-08-18 07:55:52
|
Tim, Your problem is that you are linking libstdc++.so twice. G++ already links = in libstdc++.so, so there is no reason to explicitly mention it on the comm= and line. Remove the /usr/local/lib/libstdc++.so file and it will link. The= /usr2/SOURCES8/S8/gcc-3.4.1/* and /usr/local/sparc-sun-solaris2.8/* librar= y search paths don't need to be there either as these are g++ specific dire= ctories that g++ will search as necessary. I had similar libtool problems on Solaris with both g++ and SunPRO. After u= ntar'ing QuickFIX source but before running configure, I run a script that = clean up Makefile.in, configure and Makefile files throughout the tree remo= ving the '-lstdc++' which appears in these files. Running configure and mak= e then works without a problem. This isn't the whole solution as Solaris/g++ builds still include directori= es from the g++'s source tree. From what I could see, as g++ uses libtool t= o build itself and installs *.la files pointing back to g++'s build area. W= hen QuickFIX builds, it's libtool sees the *.la files of libstdc++ and thus= adds unnecessary rubbish to the link command line. Here's part of my post-untar script for QuickFIX, it should give you an ide= a of what needs to be done. - Kris # Substitutable template for a command that generates an ed script GED_ED_SCRIPT=3D"printf ',s/ \$R//g\\\\n,s/\$R //g\\\\n,s/\$R//g\\\= \nw'" # Remove any carriage returns from C/C++ source files # Really should fix up Java files as well but they all have CRs, # java tools can handle them, we don't need to patch them and don't # we don't need to edit them CR=3D`printf '\r'` find $QF_DIR \( -name '*.h' -o -name '*.c' -o -name '*.cpp' \) | \ $XARGS grep -l "$CR" | $XARGS -ti dos2unix {} {} # Remove -lstdc++, not needed and breaks both Forte and GCC builds R=3D'-lstdc++' eval ED_SCRIPT_CMD=3D\"$GED_ED_SCRIPT\" find $QF_DIR \( -name Makefile -o -name Makefile.in -o -name config= ure \) -exec \ sh -c "set \`$ED_SCRIPT_CMD | ed \$0 | sed -n '1h;\$G;\$s/\= n/ /;\$p'\`; [ "\$1" -ne "\$2" ] && ech$ # Patch to clean up test programs, FIX constants and other miscella= neous bits (cd $QF_DIR && $PATCH -p1 < $QF_PATCH1) || exit 1 (cd $QF_DIR && $PATCH -p1 < $QF_PATCH2) || exit 1 (cd $QF_DIR && $PATCH -p1 < $QF_PATCH3) || exit 1 (cd $QF_DIR && $PATCH -p1 < $QF_PATCH4) || exit 1 # Remove -Wall flags if building with SUN PRO if [ "$MODE" =3D=3D "forte" -o "$MODE" =3D=3D "rwforte" ]; then R=3D'-Wall' eval ED_SCRIPT_CMD=3D\"$GED_ED_SCRIPT\" find $QF_DIR \( -name Makefile -o -name Makefile.in -o -na= me configure \) -exec \ sh -c "set \`$ED_SCRIPT_CMD | ed \$0 | sed -n '1h;\$G;\$s/\= n/ /;\$p'\`; [ "\$1" -ne "\$2" ] && ech$ # Patches for Forte (cd $QF_DIR && $PATCH -p1 < $QF_SUNPRO_PATCH1) || exit 1 (cd $QF_DIR && $PATCH -p1 < $QF_SUNPRO_PATCH2) || exit 1 (cd $QF_DIR && $PATCH -p1 < $QF_SUNPRO_PATCH3) || exit 1 fi fi -----Original Message----- From: qui...@li... [mailto:qui...@li...]On Behalf Of Tim Feeney Sent: 17 August 2004 19:12 To: qui...@li... Subject: [Quickfix-developers] Solaris compile problems QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/ind= ex.html QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ QuickFIX Support: http://www.quickfixengine.org/services.html I tried to send this question to the users list but it was bounced back. I have a Solaris 2.8 machine that I am trying to compile quickfix on. Here is the setup gcc - 3.4.1 automake - 1.8.4 libtool - 1.5 autoconf - 2.59 libxml2 - 2.6.9 m4 - 1.4.1 I have an older version from a Mac that is running quickfix that fails to compile giving me an error: configure.in:14: /usr/local/bin/m4: ERROR: Reading inserted file: No such file or directory If I run bootstrap first on this build it also gives the same error. I downloaded the latest version to see if that was the problem but this does not compile either. I get configure to run through with no problems but when I then run make I get: g++ -g -O2 -Wall -I/usr/local/include/libxml2 -I/include -I/include/solaris -o .libs/at at.o C++/.libs/libquickfix.so -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/ssl/lib /usr/local/lib/libstdc++.so -L/usr2/SOURCES/S8/gcc-3.4.1/objdir/sparc-sun-solaris2.8/libstdc++-v3/=20 src -L/usr2/SOURCES/S8/gcc-3.4.1/objdir/sparc-sun-solaris2.8/libstdc++-v3/=20 src/.libs -L/usr2/SOURCES/S8/gcc-3.4.1/objdir/gcc -L/usr/local/sparc-sun-solaris2.8/bin -L/usr/local/sparc-sun-solaris2.8/lib -L/usr/local/lib/../sparc-sun-solaris2.8/lib /usr/local/lib/libxml2.so -lz -lpthread /usr/local/lib/libiconv.so -lm -lsocket -lnsl -liberty -Wl,-R -Wl,/usr/local/lib ld: warning: file /usr/local/lib/libstdc++.so: attempted multiple inclusion of file If I run bootstrap I get the same message with regards to configure.in. I don't see anything in the list archives, so any hints/help from people that have gotten this to work? Tim ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers <font face=3D"Times New Roman" size=3D"3"> <p>------------------------------------------------------------------------= ------</p> <p> This email is intended only for the use of the individual(s) to whom it= is addressed and may be privileged and confidential. Unauthorised use or d= isclosure is prohibited. If you receive this e-mail in error, please advise= immediately and delete the original message. This message may have been al= tered without your or our knowledge and the sender does not accept any liab= ility for any errors or omissions in the message.</p> <p>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D</p> </font> |