Menu

Solaris9 X86 compile error

Help
Andy R.
2005-01-27
2013-04-23
  • Andy R.

    Andy R. - 2005-01-27

    Hi there,

    moving my site from an old SuSE 8.2 to a new Solaris9 X86. When im trying to compile mod_auth_mysql, i get errors. This what i've did:

    bash@ser0134:/usr/apache/bin# ./apxs -c -L/opt/sfw/mysql/lib/mysql -I/opt/sfw/mysql/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c

    Output:

    cc -DSOLARIS2=290 -DMOD_PERL -DEAPI -DUSE_EXPAT -I../lib/expat-lite -O   -Xa  -xildoff -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_SO_LINGER -DHARD_SERVER_LIMIT=2048 -O   -Xa  -xildoff -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPIC -KPIC -DUSE_SO_LINGER -DHARD_SERVER_LIMIT=2048 -I/usr/apache/include -I/opt/sfw/mysql/include/mysql  -c mod_auth_mysql.c
    apxs:Break: Command failed with rc=72057594037927935

    Google has only one link with the same "rc=", its something about a pam_module and missing libs. But as far as i can see, there are no missing libs for now.

    Does anyone maybe know what to do?

     
    • Jerry Stuckle

      Jerry Stuckle - 2005-01-27

      Hi, Andy,

      I haven't seen this particular error message.  It's nice when they give you so much information, isn't it? :-)

      It looks like your compile command is failing; a missing or incorrect directory may indeed be at fault here.  If so, it would be a header file because you're only compiling at this point - not linking.

      I'm curious - what happens when you enter that same command from a prompt (i.e. bypass apxs)?  Do you get any other information?  apxs shouldn't be supressing any output, but I guess it could happen.

      Also, are your Apache include files in /usr/apache/include?  This should have been set up at Apache installation (I suspect they are from your original command).  And have you verified the presence of /opt/sfw/mysql/include/mysql/mysql.h?  Note I've seen this in two different locations - (path)/mysql/include and (path)/mysql/include/mysql.  If you have two copies (one in each path), you might try the second path statement.

      One other shot - which will require inspecting a lot of output.  Try the -E (run the preprocessor only) option and redirect the output to a file.  Then look through this file to see if it can't find an include file.  But beware - you'll get thousands of lines of output.

      Sorry I don't have better thoughts for you - it's something I haven't run across.

      Jerry

       
    • Andy R.

      Andy R. - 2005-01-28

      Hi Jerry,

      thx for your answer. You're right, using the same command in a shell gave me the a message about a missing language pack for solaris.

      After a bit of google and asking friends, i found out that solaris dont have an original cc-compiler (which is used by apxs in solaris), its just a shell-script an you have to buy the cc for solaris.

      So i compared the compilerflags in the slaris-apxs-script with some from an old linux mache. With help i managed to get it to work.

      For other people who maybe have the same problem, this is what i did. I changed the following parts of the apxs-script.

      my $CFG_CFLAGS        = q( -DSOLARIS2=290 -DMOD_PERL -DEAPI -DUSE_EXPAT -I../lib/expat-lite -O   -Xa  -xildoff -D_LARGEFILE_SO
      URCE -D_FILE_OFFSET_BITS=64 -DUSE_SO_LINGER -DHARD_SERVER_LIMIT=2048 `../apaci`);            # substituted via Makefile.tmpl
      my $CFG_CFLAGS_SHLIB  = q(-O   -Xa  -xildoff -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPIC -KPIC -DUSE_SO_LINGER -DHARD_SER
      VER_LIMIT=2048);      # substituted via Makefile.tmpl
      my $CFG_LD_SHLIB      = q(ld);          # substituted via Makefile.tmpl
      my $CFG_LDFLAGS_SHLIB = q(-G); # substituted via Makefile.tmpl
      my $CFG_LIBS_SHLIB    = q();        # substituted via Makefile.tmpl

      to:
      my $CFG_CFLAGS        = q( -DSOLARIS2=290 -I/usr/include/db1 -DEAPI -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite `../apaci`);
                  # substituted via Makefile.tmpl
      my $CFG_CFLAGS_SHLIB  = q(-fpic -DSHARED_MODULE);      # substituted via Makefile.tmpl
      my $CFG_LD_SHLIB      = q(gcc);          # substituted via Makefile.tmpl
      my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl

      After that, i was able to compile the module with:
      /usr/apache/bin/apxs -c -L/opt/sfw/mysql/lib/mysql -I/opt/sfw/mysql/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c

      It isnt working till now, the apache loads it, but i got no authorisation till now. But that could be a configuration-problem.

      Hope that helps someone...

       
    • Jerry Stuckle

      Jerry Stuckle - 2005-01-28

      Andy,

      Thanks for the info.  I'll take a look at adding it to the BUILD file for future info.

      Jerry

       
    • Jerry Stuckle

      Jerry Stuckle - 2005-01-28

      One other thing -

      Configuration isn't too bad.  The biggest thing to remeember is if your using .htaccess, ensure AllowOverrides is set in your httpd.conf.

      Jerry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.