How to set CXXFLAGS in a login shell on HP-UX - HP UX

This is a discussion on How to set CXXFLAGS in a login shell on HP-UX - HP UX ; Dear friends while configuring Systinet Server , I have to set CXXFLAGS in my login shell. It's the C++ flags variable that's used by the configure script of the Systinet system. I am not sure how to set those. Does ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: How to set CXXFLAGS in a login shell on HP-UX

  1. How to set CXXFLAGS in a login shell on HP-UX

    Dear friends

    while configuring Systinet Server , I have to set CXXFLAGS in my login
    shell. It's the C++ flags variable that's used by the configure
    script of the Systinet system. I am not sure how to set those.
    Does anyone know about it.
    Thanks
    Amit


  2. Re: How to set CXXFLAGS in a login shell on HP-UX

    · Amit_Basnak :

    > Dear friends
    >
    > while configuring Systinet Server , I have to set CXXFLAGS in my login
    > shell. It's the C++ flags variable that's used by the configure
    > script of the Systinet system. I am not sure how to set those.


    That's a plain "shell" environment variable. You set it exactly the
    same way, you set any other variable. Eg.

    export CXXFLAGS=-pipe

    This is, assuming you're using a bourne shell, ie. not a C shell.

    Alexander Skwar
    --
    Conscience is a mother-in-law whose visit never ends.
    -- H. L. Mencken


  3. Re: How to set CXXFLAGS in a login shell on HP-UX

    Alex thanksfor your reply
    here is the complete information

    I have installed the Systinet Serve 6.5 for C++ on my HP-UX box now
    while trying to run a simple demo program first , we need to compile
    the it first on Hp-UX and there is a ./configure script to be run. This
    configure.sh scrip while running gves an error at CXXFLAGS parameter
    which is the C++ flags variable that's used by the configure script
    of the Systinet system. While running the ./configure script the erorr
    I m getting is
    "error: CXXFLAGS used during compilation of SSC do not work. You are
    probably using different C++ compiler."

    The part of a shell script which has the above error message is as
    below :
    -----------------------------------------------------------
    _ACEOF
    rm -f conftest.$ac_objext
    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    (eval $ac_compile) 2>conftest.er1
    ac_status=$?
    grep -v '^ *+' conftest.er1 >conftest.err
    rm -f conftest.er1
    cat conftest.err >&5
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } &&
    { ac_try='test -z "$ac_cxx_werror_flag"
    || test ! -s conftest.err'
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }; } &&
    { ac_try='test -s conftest.$ac_objext'
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }; }; then
    :
    else
    echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5

    { { echo "$as_me:$LINENO: error: CXXFLAGS used during compilation of
    SSC do not work.
    You are probably using different C++ compiler. The original
    flags
    were: $WASP_CXXFLAGS" >&5
    echo "$as_me: error: CXXFLAGS used during compilation of SSC do not
    work.
    You are probably using different C++ compiler. The original
    flags
    were: $WASP_CXXFLAGS" >&2;}
    { (exit 1); exit 1; }; }
    fi
    rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_ext=c
    ac_cpp='$CPP $CPPFLAGS'
    ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
    ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
    conftest.$ac_ext $LIBS >&5'
    ac_compiler_gnu=$ac_cv_c_compiler_gnu

    ---------------------------------------------------------
    And we are still not able to figure out why it is failing in the if
    condition prints the message
    We have aCC compiler on our Hp-UX box.

    Thanks
    Amit

    Alexander Skwar wrote:
    > Amit_Basnak :
    >
    > > Dear friends
    > >
    > > while configuring Systinet Server , I have to set CXXFLAGS in my login
    > > shell. It's the C++ flags variable that's used by the configure
    > > script of the Systinet system. I am not sure how to set those.

    >
    > That's a plain "shell" environment variable. You set it exactly the
    > same way, you set any other variable. Eg.
    >
    > export CXXFLAGS=-pipe
    >
    > This is, assuming you're using a bourne shell, ie. not a C shell.
    >
    > Alexander Skwar
    > --
    > Conscience is a mother-in-law whose visit never ends.
    > -- H. L. Mencken



  4. Re: How to set CXXFLAGS in a login shell on HP-UX

    On 8 Nov 2006 21:01:22 -0800, Amit_Basnak wrote:
    > Dear friends
    >
    > while configuring Systinet Server , I have to set CXXFLAGS in my login
    > shell. It's the C++ flags variable that's used by the configure
    > script of the Systinet system. I am not sure how to set those.
    > Does anyone know about it.
    > Thanks
    > Amit


    When using sh (should also work with ksh and bash) I usually use
    something like

    CXX=aCC CXXFLAGS= ./configure

    A bientot
    Paul
    --
    Paul Floyd http://paulf.free.fr (for what it's worth)
    Surgery: ennobled Gerald.

  5. Re: How to set CXXFLAGS in a login shell on HP-UX

    Thanks Paul

    You mentioned like I usually use
    > something like
    >
    > CXX=aCC CXXFLAGS= ./configure


    CXXFLAGS= ./configure
    What does mean here ? It looks like it has to be compiled
    with gcc but we have aCC compiler installed. How would I set CXXFLAGS
    set to aCC compiler ?

    Thanks for your time

    Regards
    Amit

    Paul Floyd wrote:
    > On 8 Nov 2006 21:01:22 -0800, Amit_Basnak wrote:
    > > Dear friends
    > >
    > > while configuring Systinet Server , I have to set CXXFLAGS in my login
    > > shell. It's the C++ flags variable that's used by the configure
    > > script of the Systinet system. I am not sure how to set those.
    > > Does anyone know about it.
    > > Thanks
    > > Amit

    >
    > When using sh (should also work with ksh and bash) I usually use
    > something like
    >
    > CXX=aCC CXXFLAGS= ./configure
    >
    > A bientot
    > Paul
    > --
    > Paul Floyd http://paulf.free.fr (for what it's worth)
    > Surgery: ennobled Gerald.



  6. Re: How to set CXXFLAGS in a login shell on HP-UX

    · Amit_Basnak :

    > Thanks Paul
    >
    > You mentioned like I usually use
    >> something like
    >>
    >> CXX=aCC CXXFLAGS= ./configure

    >
    > CXXFLAGS= ./configure
    > What does mean here ?


    Whatever is appropriate. Eg. -pipe. Or whatever.

    > It looks like it has to be compiled
    > with gcc but we have aCC compiler installed.


    Hm, how about you install gcc? http://hp.com/go/gcc

    > How would I set CXXFLAGS
    > set to aCC compiler ?


    Exactly the same way, like you'd do it for gcc.

    Alexander Skwar
    --
    BOFH Excuse #371:

    Incorrectly configured static routes on the corerouters.


  7. Re: How to set CXXFLAGS in a login shell on HP-UX

    Alexandar

    The current version of aCC compiler installed on our HP-UX is
    /orainst/rcsinbg1>what /opt/aCC/bin/aCC

    /opt/aCC/bin/aCC:

    HP aC++ B3910B A.03.37

    HP aC++ B3910B A.03.30 Language Support Library


    I executed the command as below on my HP-UX box
    /export/home/amitbas/systinet/server_cpp65/share/doc/waspc/demos>./configure
    CXX= /opt/aCC/bin/aCC CXXFLAGS="-g -O "

    and Im posting the errors I have got
    configure: WARNING: you should use --build, --host, --target

    configure: WARNING: invalid host type: /opt/aCC/bin/aCC

    checking for a BSD-compatible install... ./install-sh -c

    checking whether build environment is sane... yes

    checking for gawk... no

    checking for mawk... no

    checking for nawk... no

    checking for awk... awk

    checking whether make sets $(MAKE)... yes

    checking for /opt/aCC/bin/aCC-gcc... no

    checking for gcc... no

    checking for /opt/aCC/bin/aCC-cc... no

    checking for cc... cc

    checking for C compiler default output file name... a.out

    checking whether the C compiler works... yes

    checking whether we are cross compiling... no

    checking for suffix of executables...

    checking for suffix of object files... o

    checking whether we are using the GNU C compiler... no

    checking whether cc accepts -g... yes

    checking for cc option to accept ANSI C... none needed

    checking for style of include used by make... GNU

    checking dependency style of cc... hp

    checking for /opt/aCC/bin/aCC-g++... no

    checking for /opt/aCC/bin/aCC-c++... no

    checking for /opt/aCC/bin/aCC-gpp... no

    checking for /opt/aCC/bin/aCC-aCC... no

    checking for /opt/aCC/bin/aCC-CC... no

    checking for /opt/aCC/bin/aCC-cxx... no

    checking for /opt/aCC/bin/aCC-cc++... no

    checking for /opt/aCC/bin/aCC-cl... no

    checking for /opt/aCC/bin/aCC-FCC... no

    checking for /opt/aCC/bin/aCC-KCC... no

    checking for /opt/aCC/bin/aCC-RCC... no

    checking for /opt/aCC/bin/aCC-xlC_r... no

    checking for /opt/aCC/bin/aCC-xlC... no

    checking for g++... no

    checking for c++... no

    checking for gpp... no

    checking for aCC... no

    checking for CC... no

    checking for cxx... no

    checking for cc++... no

    checking for cl... no

    checking for FCC... no

    checking for KCC... no

    checking for RCC... no

    checking for xlC_r... no

    checking for xlC... no

    checking whether we are using the GNU C++ compiler... no

    checking whether g++ accepts -g... no

    checking dependency style of g++... none

    checking whether cc understands -c and -o together... yes

    checking whether ln -s works... yes

    checking how to run the C preprocessor... cc -E

    checking for egrep... grep -E

    checking for ANSI C header files... yes

    checking for sys/types.h... yes

    checking for sys/stat.h... yes

    checking for stdlib.h... yes

    checking for string.h... yes

    checking for memory.h... yes

    checking for strings.h... yes

    checking for inttypes.h... yes

    checking for stdint.h... no

    checking for unistd.h... yes

    checking for waspc-config...
    /opt/systinet/server_cpp65/bin/waspc-config

    configure: error: CXXFLAGS used during compilation of SSC do not work.

    You are probably using different C++ compiler. The original
    flags

    were:

    ---------------------------------------------------------------------------------------------------------------------------------
    In spite of the location of aCC comiler for compiling >./configure CXX=
    /opt/aCC/bin/aCC CXXFLAGS="-g -O "

    we are still getting the errors ,
    Thanks
    Amit


    Alexander Skwar wrote:
    > Amit_Basnak :
    >
    > > Thanks Paul
    > >
    > > You mentioned like I usually use
    > >> something like
    > >>
    > >> CXX=aCC CXXFLAGS= ./configure

    > >
    > > CXXFLAGS= ./configure
    > > What does mean here ?

    >
    > Whatever is appropriate. Eg. -pipe. Or whatever.
    >
    > > It looks like it has to be compiled
    > > with gcc but we have aCC compiler installed.

    >
    > Hm, how about you install gcc? http://hp.com/go/gcc
    >
    > > How would I set CXXFLAGS
    > > set to aCC compiler ?

    >
    > Exactly the same way, like you'd do it for gcc.
    >
    > Alexander Skwar
    > --
    > BOFH Excuse #371:
    >
    > Incorrectly configured static routes on the corerouters.



  8. Re: How to set CXXFLAGS in a login shell on HP-UX

    Amit wrote:
    : The current version of aCC compiler installed on our HP-UX is
    : HP aC++ B3910B A.03.37

    : HP aC++ B3910B A.03.30 Language Support Library

    That's pretty old.
    http://h21007.www2.hp.com/dspp/tech/...3,1743,00.html

    : I executed the command as below on my HP-UX box
    : /export/home/amitbas/systinet/server_cpp65/share/doc/waspc/demos>./configure
    : CXX= /opt/aCC/bin/aCC CXXFLAGS="-g -O "

    You can't have a space after the "=", try:
    ./configure CXX=/opt/aCC/bin/aCC CXXFLAGS="-g -O "

    Note using both -g and -O may get you into trouble.
    Use one or the other.

    : configure: WARNING: invalid host type: /opt/aCC/bin/aCC

    This shows that /opt/aCC/bin/aCC was taken as something else.

    : checking for aCC... no

    Hopefully this should be good now.

    : ------------------------------------------------------
    : In spite of the location of aCC comiler for compiling >./configure CXX=
    : /opt/aCC/bin/aCC CXXFLAGS="-g -O "
    : we are still getting the errors,
    : Amit

    Try again without that space.

  9. Re: How to set CXXFLAGS in a login shell on HP-UX

    Dennis, Alexander and Paul Thank you very much for all your inputs and
    time
    I was able to compile it successfully
    The command I gave was
    /export/home/amitbas/systinet/server_cpp65/share/doc/waspc/demos>./configure
    CXX= /opt/aCC/bin/aCC

    I verified with the The log file: config.log entries are correct and
    configure exited with 0 status that's success!
    1381 configure: exit 0
    Thank you for all your help.



    Dennis Handly wrote:
    > Amit wrote:
    > : The current version of aCC compiler installed on our HP-UX is
    > : HP aC++ B3910B A.03.37
    >
    > : HP aC++ B3910B A.03.30 Language Support Library
    >
    > That's pretty old.
    > http://h21007.www2.hp.com/dspp/tech/...3,1743,00.html
    >
    > : I executed the command as below on my HP-UX box
    > : /export/home/amitbas/systinet/server_cpp65/share/doc/waspc/demos>./configure
    > : CXX= /opt/aCC/bin/aCC CXXFLAGS="-g -O "
    >
    > You can't have a space after the "=", try:
    > ./configure CXX=/opt/aCC/bin/aCC CXXFLAGS="-g -O "
    >
    > Note using both -g and -O may get you into trouble.
    > Use one or the other.
    >
    > : configure: WARNING: invalid host type: /opt/aCC/bin/aCC
    >
    > This shows that /opt/aCC/bin/aCC was taken as something else.
    >
    > : checking for aCC... no
    >
    > Hopefully this should be good now.
    >
    > : ------------------------------------------------------
    > : In spite of the location of aCC comiler for compiling >./configure CXX=
    > : /opt/aCC/bin/aCC CXXFLAGS="-g -O "
    > : we are still getting the errors,
    > : Amit
    >
    > Try again without that space.



+ Reply to Thread