You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by "Combes, Chris M." <cc...@northropgrumman.com> on 2002/05/31 17:09:59 UTC

Compiling libapreq with 'cc'

Hello,

I need to compile libapreq using 'cc' and not 'gcc', under HP-UX.11.0.

I get a "too many arguments error" during the make process.

cc -DHAVE_CONFIG_H -I. -I. -I. -I/h/projects/mirror/include/apache -g -O2 -Wp,-MD,.deps/apache_cookie.pp -c
apache_cookie.c
cc: warning 422: Unknown option "2" ignored.
cpp: error 3: Too many arguments to cpp.

I'm not well versed in the makefile process, but I am learning as I can.

I understand the -M argument defines dependencies for makefiles.

If I change the
-MD,.deps.apache_cookie.pp
to
-M.deps.apache_cookie.pp

it yields a partial compile, but doesn't created the shared library.

Is there something simple I can change to get it to work?
What can I change from the download itself to support 'cc'?

I need to get this library to compile.

Any help appreciated,
Chris

Re: Compiling libapreq with 'cc'

Posted by "Combes, Chris M." <cc...@northropgrumman.com>.
Some more notes...

My reason for needing 'cc' is that 'gcc' doesn't seem to produce position independent code, so that if I compile some
other code with libaapreq.a I get the following error:
(note: libapreq compiles okay with 'gcc')

>mk
process_target_list -l ../../../xml/list/generated_target_list.txt -t html '\#include \"g${record}_html.h\"' >
generated_includes.h
process_target_list -l ../../../xml/list/generated_target_list.txt -t html 'CREATE_ENTRY\(${record}\)' >
generated_list.h
pedantic_cc cc-snap-link +DAportable +DS2.0 -g +z -D_HPUX_SOURCE -Dhpux -DDEBUG=1 -I/usr/include/X11R6
-I/usr/contrib/X11R6/include -I/usr/include/Motif2.1 -I/h/projects/mirror/include -I/h/projects/mirror/debx/COTS/Xmt/inc
-I/h/projects/mirror/debx/ECPN/src/c/inc -DEAPI -c mod_testapreq.c
checking mod_testapreq.c:
cc-snap-link +DAportable +DS2.0 -g +z -D_HPUX_SOURCE -Dhpux -DDEBUG=1 -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
-I/usr/include/Motif2.1 -I/h/projects/mirror/include -I/h/projects/mirror/debx/COTS/Xmt/inc
-I/h/projects/mirror/debx/ECPN/src/c/inc -DEAPI -c mod_testapreq.c
ar-snap-link rl /h/projects/mirror/EC/libs/libmod_testapreq.a mod_testapreq.o
ar: creating /h/projects/mirror/EC/libs/libmod_testapreq.a
creating mod_testapreq.d
rm -f mod_testapreq.o
mksl  /h/projects/mirror/EC/libs/libmod_testapreq.sl /h/projects/mirror/EC/libs/libmod_testapreq.a
/h/projects/mirror/EC/libs/libapreq.a 
ld: DP relative code in file /h/projects/mirror/EC/libs/libapreq.a(apache_cookie.o) - shared library must be position
    independent.  Use +z or +Z to recompile.
size:  /h/projects/mirror/EC/libs/libmod_testapreq.sl:  cannot open
libmod_testapreq.sl:
chmod: can't access /h/projects/mirror/EC/libs/libmod_testapreq.sl
gmake: *** [/h/projects/mirror/EC/libs/libmod_testapreq.sl] Error 1

Chris

> 
> Hello,
> 
> I need to compile libapreq using 'cc' and not 'gcc', under HP-UX.11.0.
> 
> I get a "too many arguments error" during the make process.
> 
> cc -DHAVE_CONFIG_H -I. -I. -I. -I/h/projects/mirror/include/apache -g -O2 -Wp,-MD,.deps/apache_cookie.pp -c
> apache_cookie.c
> cc: warning 422: Unknown option "2" ignored.
> cpp: error 3: Too many arguments to cpp.
> 
> I'm not well versed in the makefile process, but I am learning as I can.
> 
> I understand the -M argument defines dependencies for makefiles.
> 
> If I change the
> -MD,.deps.apache_cookie.pp
> to
> -M.deps.apache_cookie.pp
> 
> it yields a partial compile, but doesn't created the shared library.
> 
> Is there something simple I can change to get it to work?
> What can I change from the download itself to support 'cc'?
> 
> I need to get this library to compile.
> 
> Any help appreciated,
> Chris