Solaris Build Notes

See also Berkeley DB notes on Solaris

  1. Solaris build commands

    Normal build command for Solaris using Sun Workshop 64-bit and no options:

    bash ./buildall.sh -c cc -x CC \
        --with-configure-env="CFLAGS='-xarch=v9' \
        CXXFLAGS='-xarch=v9' LDFLAGS='-xarch=v9'" 

    Normal build command for Solaris using Gnu tools and no options, 32-bit:

    bash ./buildall.sh -c gcc -x g++ \
        --with-configure-env="CFLAGS='-mcpu=v9' \
        CXXFLAGS='-mcpu=v9' LDFLAGS='-mcpu=v9 \
        -L$PWD/install/lib'" 

    Normal build command for Solaris using Gnu tools and no options, 64-bit:

    export LD_LIBRARY_PATH=/usr/sfw/lib/64
    bash ./buildall.sh -c gcc -x g++ --with-configure-env="CFLAGS='-m64 \
        -mcpu=v9' CXXFLAGS='-m64 -mcpu=v9 -L$PWD/install/lib' \
        LDFLAGS='-m64 -mcpu=v9 -L$PWD/install/lib

    Some Solaris system can't build debug library with -g option, it is a known issue in sun's C++ library. Use -g0 instead.

    When building using Sun Workshop there may be a link error indicating that the symbol "pow" or "sqrt" is undefined. If this occurs add "-lm" to LIBS in the build command.