Menu

Building under Solaris

Help
Smolex
2005-09-20
2013-05-15
  • Smolex

    Smolex - 2005-09-20

    Hi
    I'm trying to build mod_cplusplus 1.5.2 under sparc-solaris-2.9 platform, using:

    apache 2.0.54
    gcc 3.4.2
    gnu make 3.80
    solaris ld (/usr/ccs/bin/ld)
    autoconf 2.59
    automake 1.9
    ...what else matters?

    I run ./autogen.sh --with-apxs=/usr/local/apache2/bin/apxs, it seems to work without any errors.
    Then I run make and see:

    bash-2.05# make
    make  all-recursive
    make[1]: Entering directory `/temp/mod_cplusplus-1.5.2'
    Making all in src
    make[2]: Entering directory `/temp/mod_cplusplus-1.5.2/src'
    if /bin/bash ../libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/apache2/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include  -I/usr/local/apache2/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -D_REENTRANT -DHAVE_PTHREADS -fpermissive -felide-constructors -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -pthreads -Wall -Werror -g -I/temp/mod_cplusplus-1.5.2/include  -g -O2 -MT mod_cplusplus.lo -MD -MP -MF ".deps/mod_cplusplus.Tpo" -c -o mod_cplusplus.lo mod_cplusplus.c; \ then mv -f ".deps/mod_cplusplus.Tpo" ".deps/mod_cplusplus.Plo"; else rm -f ".deps/mod_cplusplus.Tpo"; exit 1; fi
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/apache2/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -I/usr/local/apache2/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include -I/sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include -D_REENTRANT -DHAVE_PTHREADS -fpermissive -felide-constructors -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -pthreads -Wall -Werror -g -I/temp/mod_cplusplus-1.5.2/include -g -O2 -MT mod_cplusplus.lo -MD -MP -MF .deps/mod_cplusplus.Tpo -c mod_cplusplus.c  -fPIC -DPIC -o .libs/mod_cplusplus.o
    cc1: warning: command line option "-fpermissive" is valid for C++/ObjC++ but not for C
    cc1: warning: command line option "-felide-constructors" is valid for C++/ObjC++ but not for C
    make[2]: *** [mod_cplusplus.lo] Error 1
    make[2]: Leaving directory `/temp/mod_cplusplus-1.5.2/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/temp/mod_cplusplus-1.5.2'
    make: *** [all] Error 2

    well...i don't know how to deal with it...

    In fact, I dont understand why it assumes that apache src dir is /sol10/SOURCES/S9/httpd-2.0.54 and how to change it. However, I've created a symlink /sol10/SOURCES/S9/httpd-2.0.54 pointing to my apache src dir, but this haven't brought any result :(

     
    • John K. Sterling

      Hi -

      mod_cplusplus finds the apache source dir by querying apxs.  is /usr/local/apache2/bin/apxs returning the wrong values?  Run it yourself with the following and post the results:
      -q INCLUDEDIR
      -q APR_INCLUDEDIR
      -q APU_INCLUDEDIR
      -q CFLAGS
      -q CXXFLAGS
      -q EXTRA_CPPFLAGS
      -q EXTRA_CFLAGS

      My guess is that the flags you're getting a warning on are from apache cxx flags, but I'm not sure.  It is failing because by default mod_cplusplus builds with -Werror.  If you remove -Werror from configure.in and rerun autogen.sh, it might get you past this problem, but I'm concerned about the results of apxs.

       
      • John K. Sterling

        I suspect those warnings are related to the failure.  It all must come back to the apxs being borked.  Can you send me the output of those apxs queries from the previous thread?  Also, did you install apache binaries?  Or build from source?

        Thanks.

        John

         
    • Smolex

      Smolex - 2005-09-20

      Thanks, removing Werror has helped a bit :)
      apxs does really point to /sol10/SOURCES/S9/httpd-2.0.54/* but never mind, with a symlink it didn't say anything wrong.

      But unfortunately, make produces another error after a while:

      g++ -shared -nostdlib  /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/crti.o /usr/ccs/lib/values-Xa.o /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/crtbegin.o  .libs/mod_cplusplus.o .libs/apache_handler.o .libs/apache_filters.o .libs/apache_protocol.o .libs/cpp_request.o .libs/cpp_server.o .libs/apache_output_buffer.o .libs/request_env.o .libs/env_hash.o .libs/env_value.o  -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -L/usr2/SOURCES/S9/gcc-3.4.1/objdir/gcc -L/usr2/SOURCES/S9/gcc-3.4.1/objdir/sparc-sun-solaris2.9/libstdc++-v3/src/.libs -L/usr2/SOURCES/S9/gcc-3.4.1/objdir/sparc-sun-solaris2.9/libstdc++-v3/src -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../.. /usr/local/lib/libstdc++.so -lm -lgcc_s /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/crtend.o /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/crtn.o  -Wl,-h -Wl,libmod_cplusplus-1.1.0.so -o .libs/libmod_cplusplus-1.1.0.so
      (cd .libs && rm -f libmod_cplusplus.so && ln -s libmod_cplusplus-1.1.0.so libmod_cplusplus.so)
      false cru .libs/libmod_cplusplus.a  mod_cplusplus.o apache_handler.o apache_filters.o apache_protocol.o cpp_request.o cpp_server.o apache_output_buffer.o request_env.o env_hash.o env_value.o
      make[2]: *** [libmod_cplusplus.la] Error 1
      make[2]: Leaving directory `/temp/mod_cplusplus-1.5.2/src'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/temp/mod_cplusplus-1.5.2'
      make: *** [all] Error 2

      now trying to fix this one :)

       
    • Smolex

      Smolex - 2005-09-20

      Here:
      bash-2.05# /usr/local/apache2/bin/apxs -q INCLUDEDIR
      /usr/local/apache2/include
      bash-2.05# /usr/local/apache2/bin/apxs -q APR_INCLUDEDIR
      /sol10/SOURCES/S9/httpd-2.0.54/srclib/apr/include
      bash-2.05# /usr/local/apache2/bin/apxs -q APU_INCLUDEDIR
      /sol10/SOURCES/S9/httpd-2.0.54/srclib/apr-util/include
      bash-2.05# /usr/local/apache2/bin/apxs -q CFLAGS
      -D_REENTRANT -DHAVE_PTHREADS
      bash-2.05# /usr/local/apache2/bin/apxs -q CXXFLAGS
      -fpermissive -felide-constructors
      bash-2.05# /usr/local/apache2/bin/apxs -q EXTRA_CPPFLAGS
      -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
      bash-2.05# /usr/local/apache2/bin/apxs -q EXTRA_CFLAGS
      -pthreads

      Yes, I've installed apache binaries from sunfreeware an did not build the thing. That explains these paths from apxs, but I dont see how can it matter if I just put the sources into that path...

       
      • John K. Sterling

        I agree that the soft link will fix the includes, I've just never seen apxs return wrong information like that unless it was borked.  I wonder if the CXXFlags are wrong, too - which would explain the strange warnings.

        You could try to disable out the line in configure.in that queries the CXXFlags.  I'll see if I can reproduce any of this, too.

         
    • Smolex

      Smolex - 2005-09-21

      removing cxxflags didn't fix the problem.

      It's okay, I dropped that binary apache and built it from sources to my own path (there were also some issues, but I've managed to solve the...). This way mod_cplusplus has been compiled properly.

      In fact, make check gives me
      *** root mode: changing the files ownership to 'nobody' (60001:60001)
      *** sudo -u '#60001' /usr/perl5/5.6.1/bin/perl -e 'print -r "/temp/mod_cplusplus-1.5.2/test/t" &&  -w _ && -x _ ? "OK" : "NOK"'

      sh: sudo: not found
      *** result:
      !!! You are running the test suite under user 'root'.
      Apache cannot spawn child processes as 'root', therefore
      we attempt to run the test suite with user 'nobody' (60001:60001).
      The problem is that the path:
        /temp/mod_cplusplus-1.5.2/test/t
      must be 'rwx' by user 'nobody', so Apache can read and write under that
      path.

      but it's another thing

      Thanks a lot for your help!!

       

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.