hi Barak,
I'm using the Sun Workshop compiler and have successfully built log4cxx.
I used the following configure options to build a debug version (You can just replace "-g" to get optimized build.)
configure CC=CC CXX=CC CXXFLAGS="-g -mt -KPIC -xarch=v8plusa"
Here is my CC version string:
CC: Sun C++ 5.5 Patch 113817-07 2004/03/23
To make it link properly, I had to make a small source file change to thread.cpp:
I made the function asm_code() NOT static. I could not link when this function was declared static.
I noticed a few problems on Solaris with the CC compiler.
1. Lots of compile warnings. I looked at a few and they seem harmless and easy to clean up.
2. I think there is a bug in timezone.cpp. The code calls putenv() to set the TZ environment variable. The code passes an automatic variable to putenv which gets destroyed. On Sun (and other UNIXes) this is a bad thing to do. You're not supposed to free the memory you pass to putenv. The result is a corrupted environment.
3. I have not been able to use shared libraries successfully. I crash, and I suspect it's due to static initialization problems.
I hope this is helpful,
David Vasconcelos
Barak Simon ([EMAIL PROTECTED]) wrote:
Thank you for the help Jwahar! I did succeed building it using your entire tree.
Alas, I am enforced to link the resulting libraries into CC generated libraries, and since gcc and CC name mangling are incommensurate with one another, I really must find a way to build using CC.
I tried doing CXX=CC but got errors - has anyone on the list had success with building the logging library using CC (on Solaris)? If so, what version of CC and are any special preliminary steps required?
Thanks, Barak
________________________ Barak Simon GED IT Core Platform 190 George St. Sydney, 2000 Phone +61 2 925 85070 Fax +61 2 925 95050
[EMAIL PROTECTED] .com To: [email protected] cc: 28/07/2004 01:01 Subject: RE: Trying to Install/Build log4cxx on Solaris Please respond to log4cxx-user
Barak, I put my entire tree, tar'ed and compressed on our ftp server Login as user 'anonymous' with any string as passwd Set BINARY mode (bin command) And download logSolaris.tar.gz
ftp memento-inc.com Connected to memento-inc.com. 220 Microsoft FTP Service User (memento-inc.com:(none)): anonymous 331 Anonymous access allowed, send identity (e-mail name) as password. Password: 230 Anonymous user logged in. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. -r-xr-xr-x 1 owner group 13632193 Jul 27 10:52 logSolaris.tar.gz 226 Transfer complete. ftp: 78 bytes received in 0.02Seconds 3.90Kbytes/sec.
Jwahar Bammi Memento, Inc. [EMAIL PROTECTED]
-----Original Message----- From: Barak Simon [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 5:23 AM To: [email protected] Cc: Shao Zhang Subject: RE: Trying to Install/Build log4cxx on Solaris
Hi, Tnx for the answer and sorry for not replying sooner, but I only now had time to check it.
I tried running the configure file you sent me and I get: "config.status: error: cannot find input file: include/log4cxx/config_msvc.h.in"
After running make (since makefile was already created at that stage) I get: Makefile:429: appenderattachableimpl.Plo: No such file or directory Makefile:430: appenderskeleton.Plo: No such file or directory Makefile:431: asyncappender.Plo: No such file or directory Makefile:432: basicconfigurator.Plo: No such file or directory ...
and so on for each of the sources.
All this may be related to the fact that the autogen.sh (which also run the autoconf) only did part of the work required, so some of the files I need (apart from configure itself) which it normally generates (e.g. install-sh) are corrupted or do not exist...
Do you know by any chance what are the files generated by autogen and can maybe send them to me (in a structure-preserving tar)?
If not, I do not mind trying an actual generated Makefile (if need be, I can try to adapt the flags to my environment). Needless to say it is far from ideal, but I have users waiting for it, so anything that works will be welcome ( Even binaries if nothing else succeeds :( )
Thanks again, Barak
[EMAIL PROTECTED]
.com To: [email protected]
cc: Barak Simon/Sydney/DBAustralia/[EMAIL PROTECTED]
26/07/2004 11:50 Subject: RE: Trying to Install/Build log4cxx on Solaris
Please respond to
log4cxx-user
I have been compiling log4cxx for the past few versions on solaris with gcc/g++ (don't have sun cc). Attach to this message are my configure, config.status and config.log files. If I can help is some other way let me know
Jwahar Bammi Memento, Inc. [EMAIL PROTECTED]
-----Original Message----- From: Barak Simon [mailto:[EMAIL PROTECTED] Sent: Sunday, July 25, 2004 7:30 PM To: [email protected] Subject: Trying to Install/Build log4cxx on Solaris
Hi, I am trying to install log4cxx on Solaris, but get a great number of errors while running autogen.sh
The first error I get is: ERROR: Reading inserted file: No such file or directory autom4te: /usr/local/bin/m4 failed with exit status: 1
and it is being generated while "aclocal" is being invoked.
I have re-installed all the latest versions of autoconf (2.59), automake (1.8.5), libtool (1.5.6) & m4 (1.4.1) into a local directory and use them (BTW - it seems from the error message that m4 is searched in /usr/local/bin, despite the fact that my path is explicitly pointed to my local m4 version).
I gather from the release notes that version 0.9.7, though not tested on Solaris, can be compiled on it - is this correct? If so, what could I be doing wrong? PS - I would be happy to use a pre-prepared configure file for Solaris if someone has one :)
Many thanks, Barak
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
The following file(s) have been deleted by: Barak Simon on 27/07/2004 17:54:21
configure config.status config.log
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
