Thread: [Quickfix-developers] Build Quickfix with Sun SPRO compiler 6.2 or 8.0
Brought to you by:
orenmnero
From: Jim E. L. I. <jl...@ca...> - 2004-09-08 20:44:36
|
Has anybody tried to build quickfix 1.9.0 with sun compilers? =20 Jim Lackey III Catus Technologies LLC 800 W 5TH Ave. Suite 204A Naperville, IL 60563 (630) 527-8729 x102 =20 |
From: Joerg T. <Joe...@ma...> - 2004-09-09 07:59:15
|
> Has anybody tried to build quickfix 1.9.0 with sun compilers? Yes, check mailing list archive for recent mails from Kristopher Peterson. QF 1.9.0 should be able to be compiled with SunPRO 5.3 Cheers, Jörg -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Caleb E. <cal...@gm...> - 2004-09-09 15:35:15
Attachments:
quickfix-1.9.0-sunpro-5.3-build.patch
|
On Thu, 09 Sep 2004 09:58:48 +0200, Joerg Thoennes <joe...@ma...> wrote: > > Has anybody tried to build quickfix 1.9.0 with sun compilers? > > Yes, check mailing list archive for recent mails from Kristopher > Peterson. QF 1.9.0 should be able to be compiled with SunPRO 5.3 Unfortunately, 1.9.0 doesn't compile out of the box with SunPRO 5.3. A number of things from Kristopher's original patch seem not to have made it into CVS. Among them: * Remove -Wall from configure and configure.in * Remove -lstdc++ from all Makefiles * For "configure", AR must be CC (or the full path to it) and AR_FLAGS must contain "-xar -o". There ought to be some automated way for configure to detect this, otherwise the user must specify them manually when running configure, so this should be mentioned in the installation docs. * SessionIDTestCase is generating unresolved externals for me. Not sure why, but I had to comment it out from TestSuite.h to get 'ut' to compile. I'm attaching the patches I needed against stock 1.9.0 to get things to build -- Caleb Epstein cal...@gm... |
From: Andrew S. <ab...@gm...> - 2004-09-11 00:35:13
|
Regarding the SessionIDTestCase, it looks like it has to do with libtool and the Sun compiler/linker (CC). In 1.8.0 libtool generated ".o" files in the src/C++/test/.libs directory and linked them to create libquickfixcpptest. In 1.9.0 it creates and links ".lo" files in the src/C++/test directory. When creating a library CC automatically links in any necessary template object files from SunWS_cache (which is why CC must be used for linking), but a small experiment shows that it appears to only look for them if given object files ending in ".o". Thus any definitions contained in template object files needed by SessionIDTestCase are not linked into the library and are unresolved when that library is used. I'm not sure at this point why this only affects SessionIDTestCase, but to create a working library you can do the following in the src/C++/test directory after the linking fails. mv SessionIDTestCase.lo SessionIDTestCase.o CC -g -xs -xar -o .libs/libquickfixcpptest.al FieldBaseTestCase.lo FieldConvertorsTestCase.lo MessagesTestCase.lo SessionTestCase.lo ParserTestCase.lo SettingsTestCase.lo MessageStoreTestCase.lo UtcTimeStampTestCase.lo UtcTimeOnlyTestCase.lo AcceptorTestCase.lo SocketUtilitiesTestCase.lo FileUtilitiesTestCase.lo StringUtilitiesTestCase.lo SocketServerTestCase.lo SocketConnectorTestCase.lo SessionIDTestCase.o SessionTimeTestCase.lo FileStoreTestCase.lo FileStoreFactoryTestCase.lo MySQLStoreTestCase.lo DictionaryTestCase.lo SessionSettingsTestCase.lo DataDictionaryTestCase.lo mv SessionIDTestCase.o SessionIDTestCase.lo Then rebuild from the top level. Perhaps someone more familiar with the QuickFix Makefiles and with libtool and its innards can shed more light on the use of ".lo" files for this static library. Andrew On Thu, 9 Sep 2004 11:35:03 -0400, Caleb Epstein <cal...@gm...> wrote: > On Thu, 09 Sep 2004 09:58:48 +0200, Joerg Thoennes > <joe...@ma...> wrote: > > > Has anybody tried to build quickfix 1.9.0 with sun compilers? > > > > Yes, check mailing list archive for recent mails from Kristopher > > Peterson. QF 1.9.0 should be able to be compiled with SunPRO 5.3 > > Unfortunately, 1.9.0 doesn't compile out of the box with SunPRO 5.3. A > number of things from Kristopher's original patch seem not to have > made it into CVS. Among them: > > * Remove -Wall from configure and configure.in > * Remove -lstdc++ from all Makefiles > * For "configure", AR must be CC (or the full path to it) and AR_FLAGS > must contain "-xar -o". There ought to be some automated way for > configure to detect this, otherwise the user must specify them > manually when running configure, so this should be mentioned in the > installation docs. > * SessionIDTestCase is generating unresolved externals for me. Not > sure why, but I had to comment it out from TestSuite.h to get 'ut' to > compile. > > I'm attaching the patches I needed against stock 1.9.0 to get things to build > > -- > Caleb Epstein > cal...@gm... > > > > |
From: Oren M. <or...@qu...> - 2004-09-11 02:56:22
|
I applied the patch. I did make a coupld of changes. You made a change directly referencing std::labs. We need to be careful of these since some STL implementation do not define it in the std namespace (MSV6 for instance). Instead I set it back to just labs and included Utility.h at the top of the file. This will add a using std::labs for systems where it is in the std namespace. This way everywhere we can refer to it as just labs. Instead of commenting out the SessionIDTestCase in TestSuite.h, I surrounded those lines with a #if !defined(__SUNPRO_CC), and left a note for someone to take a look at it. As for the AR_FLAGS, I would expect that autoconf would be doing that work in the AC_PROG_CXX macro. What version are you using? Maybe a newer version will handle this. Can you put together a little blurb about what you did to get these setting in so I can add it to the documentation? --oren On Sep 9, 2004, at 10:35 AM, Caleb Epstein wrote: > On Thu, 09 Sep 2004 09:58:48 +0200, Joerg Thoennes > <joe...@ma...> wrote: >>> Has anybody tried to build quickfix 1.9.0 with sun compilers? >> >> Yes, check mailing list archive for recent mails from Kristopher >> Peterson. QF 1.9.0 should be able to be compiled with SunPRO 5.3 > > Unfortunately, 1.9.0 doesn't compile out of the box with SunPRO 5.3. A > number of things from Kristopher's original patch seem not to have > made it into CVS. Among them: > > * Remove -Wall from configure and configure.in > * Remove -lstdc++ from all Makefiles > * For "configure", AR must be CC (or the full path to it) and AR_FLAGS > must contain "-xar -o". There ought to be some automated way for > configure to detect this, otherwise the user must specify them > manually when running configure, so this should be mentioned in the > installation docs. > * SessionIDTestCase is generating unresolved externals for me. Not > sure why, but I had to comment it out from TestSuite.h to get 'ut' to > compile. > > I'm attaching the patches I needed against stock 1.9.0 to get things > to build > > -- > Caleb Epstein > cal...@gm... > <quickfix-1.9.0-sunpro-5.3-build.patch> |
From: Caleb E. <cal...@gm...> - 2004-09-13 12:40:50
|
On Fri, 10 Sep 2004 12:21:22 -0500, Oren Miller <or...@qu...> wrote: > As for the AR_FLAGS, I would expect that autoconf would be doing that > work in the AC_PROG_CXX macro. What version are you using? Maybe a I'm not using autoconf at all, just the supplied configure script that comes with QuickFIX. > newer version will handle this. Can you put together a little blurb > about what you did to get these setting in so I can add it to the > documentation? Basically with the SunPRO compilers, you can't use "ar" or "ld" to build static or shared libraries of C++ code, because these don't pull in all of the template instantiations. You need to use the C++ compiler (CC) with the flag -xar (static lib) or -G (shared). The -xs flag allows for debugging without having the .o files still lying around, and is optional. If you choose to not use the -g flag, you shouldn't specify -xs either. Kristofer's original email to the list that included a patch against 1.7.1 has this all spelled out (the paths to various things are system-specific; my C++ compiler lives in /opt not /usr/local): ---8<--- BUILD INSTRUCTIONS - untar quickfix-1.7.1.tar.gz - convert the eight files above to Unix test format (strip CRs with dos2unix) - apply the unified patch below (you'll need GNU patch) - export the following environment variables, editing for compiler and java location where appropriate) CC=/usr/local/SUNWspro/WS6U2/bin/CC CFLAGS=-g -xs CXX=/usr/local/SUNWspro/WS6U2/bin/CC CXXFLAGS=-g -xs LD=/usr/local/SUNWspro/WS6U2/bin/CC LDFLAGS=-g -xs -lCstd AR=/usr/local/SUNWspro/WS6U2/bin/CC AR_FLAGS=-g -xs -xar -o JAVA_HOME=/usr/local/java1.4.2 PATH=$JAVA_HOME:$PATH - run configure - make ---8<--- -- Caleb Epstein cal...@gm... |
From: Joerg T. <Joe...@ma...> - 2004-09-13 12:56:53
|
Caleb Epstein wrote: > On Fri, 10 Sep 2004 12:21:22 -0500, Oren Miller <or...@qu...> wrote: > >>As for the AR_FLAGS, I would expect that autoconf would be doing that >>work in the AC_PROG_CXX macro. What version are you using? Maybe a > > I'm not using autoconf at all, just the supplied configure script that > comes with QuickFIX. I feel there is some ambiguity in the QF setup: On the one site, there are autoconf files, but one the other side, pre-build conf files are supplied (and even checked-in into the repository). IMHO, the most stable solution would be to drop the autoconf-generated files altogether and let the users generate them in any case using the bootstrap script. They have to do that step anyway if there is any problem with the pre-built config files. Of course, this adds another step to the installation of QF and requires some assistance in the installation of autoconf tools (e.g. on Solaris), but in the end this is the way autoconf is meant to work. Caleb, could you give autoconf a try? Cheers, Jörg -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Oren M. <or...@qu...> - 2004-09-13 14:40:45
|
I don't agree with this. Generated files are distributed with the=20 releases, but I don't know of any that are checked into the repository.=20= If you know of some, make a list and we'll have them removed. Autotools generate a portable configure script so everyone knows they=20 can do a simple './configure && make' and get a reasonable build. This=20= is pretty standard and expected behavior for open source distributions.=20= I don't know what the value of adding additional dependencies would be=20= for people who have no desire to modify the build scripts. --oren On Sep 13, 2004, at 7:56 AM, Joerg Thoennes wrote: > Caleb Epstein wrote: >> On Fri, 10 Sep 2004 12:21:22 -0500, Oren Miller=20 >> <or...@qu...> wrote: >>> As for the AR_FLAGS, I would expect that autoconf would be doing = that >>> work in the AC_PROG_CXX macro. What version are you using? Maybe a >> I'm not using autoconf at all, just the supplied configure script = that >> comes with QuickFIX. > > I feel there is some ambiguity in the QF setup: On the one site, there=20= > are autoconf files, but one the other side, pre-build conf files are=20= > supplied (and even checked-in into the repository). > > IMHO, the most stable solution would be to drop the autoconf-generated=20= > files altogether and let the users generate them in any case using the=20= > bootstrap script. They have to do that step anyway if there is any=20 > problem with the pre-built config files. > > Of course, this adds another step to the installation of QF and=20 > requires some assistance in the installation of autoconf tools (e.g.=20= > on Solaris), but in the end this is the way autoconf is meant to work. > > Caleb, could you give autoconf a try? > > Cheers, J=F6rg > > --=20 > Joerg Thoennes > http://macd.com > Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH > Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen > |
From: Caleb E. <cal...@gm...> - 2004-09-13 18:02:48
|
On Mon, 13 Sep 2004 09:40:34 -0500, Oren Miller <or...@qu...> wrote: > I don't know what the value of adding additional dependencies would be > for people who have no desire to modify the build scripts. It would be a huge step backward IMHO. Anything that makes it harder for people to use the code means there will be fewer of them doing so. -- Caleb Epstein cal...@gm... |
From: Joerg T. <Joe...@ma...> - 2004-09-14 09:46:12
|
Oren Miller wrote: >> On Sep 13, 2004, at 7:56 AM, Joerg Thoennes wrote: >> >>> Caleb Epstein wrote: >>> >>>> On Fri, 10 Sep 2004 12:21:22 -0500, Oren Miller >>>> <or...@qu...> wrote: >>>> >>>>> As for the AR_FLAGS, I would expect that autoconf would be doing that >>>>> work in the AC_PROG_CXX macro. What version are you using? Maybe a >>>> >>>> I'm not using autoconf at all, just the supplied configure script that >>>> comes with QuickFIX. >>> >>> I feel there is some ambiguity in the QF setup: On the one site, there >>> are autoconf files, but one the other side, pre-build conf files are >>> supplied (and even checked-in into the repository). >>> >>> IMHO, the most stable solution would be to drop the autoconf-generated >>> files altogether and let the users generate them in any case using the >>> bootstrap script. They have to do that step anyway if there is any >>> problem with the pre-built config files. >>> >>> Of course, this adds another step to the installation of QF and >>> requires some assistance in the installation of autoconf tools (e.g. >>> on Solaris), but in the end this is the way autoconf is meant to work. > I don't agree with this. Generated files are distributed with the > releases, but I don't know of any that are checked into the repository. > If you know of some, make a list and we'll have them removed. Sorry about that. My memory fooled me. Of course, there are no generated files in the repository. > Autotools generate a portable configure script so everyone knows they > can do a simple './configure && make' and get a reasonable build. This > is pretty standard and expected behavior for open source distributions. > I don't know what the value of adding additional dependencies would be > for people who have no desire to modify the build scripts. Agreed. I was a bit unsure about *how* portable the configure scripts are. Probably the most generic approach is not always the best one. Cheers, Jörg -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Caleb E. <cal...@gm...> - 2004-09-13 18:33:13
|
On Mon, 13 Sep 2004 14:56:29 +0200, Joerg Thoennes <joe...@ma...> wrote: > Of course, this adds another step to the installation of QF and requires > some assistance in the installation of autoconf tools (e.g. on > Solaris), but in the end this is the way autoconf is meant to work. I'd highly recommend AGAINST doing this. Its another barrier to entry for people to get started with QuickFIX and goes against the grain of just about any other open source project you're liable to run across. They all ship a generated "configure". > Caleb, could you give autoconf a try? Done. It didn't help. Autoconf 2.58 does not detect that "CC" needs to be used instead of "ar" when generating the libtool script. I think this stems from the fact that these tools (autoconf etc) are used largely with C programs and the C++ support is less mature and more folks are using them on Linux or other systems where gcc is used than on Solaris with SunPRO. Anyhow, seeing as one needs to specify CC and CXX, specifying AR isn't too much to ask. -- Caleb Epstein cal...@gm... |
From: Joerg T. <Joe...@ma...> - 2004-09-09 15:44:11
|
Caleb Epstein wrote: > On Thu, 09 Sep 2004 09:58:48 +0200, Joerg Thoennes > <joe...@ma...> wrote: > >>>Has anybody tried to build quickfix 1.9.0 with sun compilers? >> >>Yes, check mailing list archive for recent mails from Kristopher >>Peterson. QF 1.9.0 should be able to be compiled with SunPRO 5.3 > > > Unfortunately, 1.9.0 doesn't compile out of the box with SunPRO 5.3. A > number of things from Kristopher's original patch seem not to have > made it into CVS. Among them: [...] > I'm attaching the patches I needed against stock 1.9.0 to get things to build Thanks, Caleb. I did not try this myself, but wanted to refer to people like you and Kristopher, which actually used it. Cheers, Jörg -- Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Caleb E. <cal...@gm...> - 2004-09-10 14:33:36
|
Just an FYI that after the patch, the code still compiles and passes all tests on Linux. Many thanks for the new release Oren. Its very solid, fixes at least one session disconnect issue we were seeing with 1.8.0 and is clearly faster. -- Caleb Epstein cal...@gm... |