Solaris 2.8 compilation problem
Status: Beta
Brought to you by:
morongo
Hi Morongo,
First of all thanks for providing the JAULA library for JSON in C++.
I am running into problem while running the configure file in solaris 2.8 on SPARC processor. The problem is that "FlexLexer.h" is not getting located. I found that it is in /usr/local/include directory. Can you please let me now what could be the reason for this?
I am attaching the config.log file for your reference. If you want any more info,please ask me.
Thanks,
Janaki
log file for the configuration process
Logged In: YES
user_id=1503114
Originator: NO
From your log I see that you are compiling with Solaris cc compiler instead of the GNU C Compiler gcc. Jaula library sources impose no restriction on any compiler as configure handles the differences from one compiler flavor to another but, if you downloaded flex from sunfreeware.com I suspect the problem can be originated by using a mix of GNU and Solaris tools that should work fine starting from sources but that may have some compatibility problems if mixed at a binary level.
The first problem I see in the log is that when the configure script tries to run flex against a test source, flex crashes.
configure:20114: flex conftest.l
flex: fatal internal error, exec failed
./configure: line 1: 25298 Broken Pipe flex conftest.l
This means that flex code generator is not working at all or at least that the test source provided for configure is not suitable for you flex release and makes it crash.
A few lines below the configure script tries to find FlexLexer.h header and it fails (there are some other errors in between that seem to be a consequence of the first one mentioned above).
configure:20277: checking FlexLexer.h usability
configure:20294: CC -c -g conftest.cpp >&5
"conftest.cpp", line 55: Error: Could not open include file<FlexLexer.h>.
To get read of the first error (the most significant one) there are some ideas you can try and that I will enumerate below:
1- Try to install a lexer generator from the same source where you obtained the compiler, preferably compiled with the same compiler level you are currently using. Jaula should work with lex or flex as configure handles the differences between them. Just uninstall the flex package that is not working, install the new candidate and execute ./configure again to see what happens.
2- Try to compile flex from sources in the same solaris box you are working with jaula and install this release (first removing sunfreeware's). Flex sources can be found at http://flex.sourceforge.net/#downloads.
3- (This one is less likely to work) Try to generate a new configure script within your environment starting from fresh sources as it is explained at http://morongo.homelinux.net/jaula/jdg1-install-svn-work. Subversion head revision is fully functional (in a GNU environment at least) by the time I am sending you this answer or you could try jaula-1.2.0-2 tag to be sure of not introducing some instability due to library inherent development process.
Once the flex not operating problem is cleared, I pressume that FlexLexer.h not found error will disappear. But solving any header not found error is as easy as looking where the header is and including the directory by use of the -I compiler directive before calling configure. If you are working with bash, command will look something like:
$ CPPFLAGS="-I <additional_directory_to_look_for_headers> -I <additional_directory_to_look_for headers> ./configure
As have no Solaris box at hand where to try this please let me know if any of my suggestions worked or if you have found the way to successfully compile the library for your environment.
Logged In: YES
user_id=1503114
Originator: NO
As this request does not detail a bug on jaula itself, I move it to the support request branch.