Operating System - HP-UX
1753697 Members
5234 Online
108799 Solutions
New Discussion юеВ

Error while compling using gcc

 
ambika_1
Frequent Advisor

Error while compling using gcc

Hi,

I am working on hpux 11.11 using gcc 64 bit compiler. I am getting following error.

gcc: +O2: No such file or directory
gcc: +z: No such file or directory

How to resolve this?
8 REPLIES 8
Arunvijai_4
Honored Contributor

Re: Error while compling using gcc

Hi Ambika,

Can you post a detailed information rather than this? its very hard to figure why it complains about No such or Direcroty. Just copy & paste full make output where it stopped.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
ambika_1
Frequent Advisor

Re: Error while compling using gcc

Hi,
I am trying to build libmilter in Sendmail utility.
I replaced cc with /opt/hp-gcc64/bin/gcc as it is a 64 bit compiler
This is the detail of the results?

# sh Build -c install
Configuration: pfx=, os=HP-UX, rel=11.11, rbase=11, rroot=11.11, arch=9000-898, sfx=, variant=optimized
Clearing out existing /sendmail-8.13.5/obj.HP-UX.11.11.9000-898/libmilter tree
Using M4=/usr/bin/m4
Creating /sendmail-8.13.5/obj.HP-UX.11.11.9000-898/libmilter using /sendmail-8.13.5/devtools/OS/HP-UX.11.x
Making dependencies in /sendmail-8.13.5/obj.HP-UX.11.11.9000-898/libmilter
Making in /sendmail-8.13.5/obj.HP-UX.11.11.9000-898/libmilter
if [ ! -d /usr/include/libmilter ]; then mkdir -p /usr/include/libmilter; else :; fi
../../devtools/bin/install.sh -c -o root -g bin -m 0444 ../../include/libmilter/mfapi.h /usr/include/libmilter/mfapi.h
../../devtools/bin/install.sh -c -o root -g bin -m 0444 ../../include/libmilter/mfdef.h /usr/include/libmilter/mfdef.h
ln -f -s ../../libsm/errstring.c .
ln -f -s ../../libsm/strl.c .
rm -f sm_os.h
ln -f -s ../../include/sm/os/sm_os_hp.h sm_os.h
/opt/hp-gcc64/bin/gcc -Ae +O2 -I. -I../../sendmail -I../../include -DV4FS -DHPUX11 -DNOT_SENDMAIL -Dsm_snprintf=snprintf -D_POSIX_C_SOURCE=199506L +z -DXP_MT -c main.c
gcc: +O2: No such file or directory
gcc: +z: No such file or directory
:1:2: missing '(' after predicate
*** Error exit code 1

Stop.
#
Arunvijai_4
Honored Contributor

Re: Error while compling using gcc

Hello,

Which version of GCC 64 bit you have installed ? Are you using sendmail 64bit version ? Just make everything is in sync.

# file /usr/sbin/sendmail

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
ambika_1
Frequent Advisor

Re: Error while compling using gcc

Hi,
file /usr/sbin/sendmail
/usr/sbin/sendmail: PA-RISC1.1 shared executable dynamically linked

Thereis is no clear information about bits.
Whereis can i get 64 bit sendmail.

H.Merijn Brand (procura
Honored Contributor

Re: Error while compling using gcc

Not hard at all. And it also does not depend on gcc's version.

What you see is HP C-ANSI-C options passed to GNU gcc, and they are not recognozed.

What you need to do is reconfigure

# env CC=gcc configure ...

or edit Makefile by hand, and change

+z -> -fpic
+Z -> -fPIC
+O2 -> -O2
-Ae ->

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Arunvijai_4
Honored Contributor

Re: Error while compling using gcc

Yes, what procura said is perfectly correct. My poor memory forgot what i did 2 years ago :-(

http://www.freeos.com/articles/3185/

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
ambika_1
Frequent Advisor

Re: Error while compling using gcc

Even after doing that modification also its not building libmilter for 64 bits. This libmilter I am using in clamav build.

By execting following command:
./configure --prefix=/opt/iexpress/clamav --enable-milter --with-tcpwrapper --without-libcurl --disable-gethostbyname_r

Checking for mi_stop in -lmilter... no
configure: error: Cannot find libmilter

So how to solve this?
Arunvijai_4
Honored Contributor

Re: Error while compling using gcc

Hello,

Checking for mi_stop in -lmilter... no
configure: error: Cannot find libmilter

Configure script is looking for libmilter in SHLIB_PATH. Do you have that installed ? Or, you can export # export SHLIB_PATH=/usr/local/lib:$SHLIB_PATH

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"