Bug #288
gcc:gcc: unrecognized option `-KPIC'
0%
Description
I am trying to compile libprelude on Solaris 10 (Sparc) i can configure but when i make its gives me following error. CAn you help please
gcc -c -I../.. -I../../src/include -I../../src/include -I../../src/libprelude-error -D_REENTRANT -pthreads -D_REENTRANT -xO3 -xtarget=ultra -xarch=v8 -I/opt/csw/bdb44/include -I/opt/csw/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xtarget=ultra -xarch=v8 -DVERSION=\"\" -DXS_VERSION=\"\" -KPIC "-I/opt/csw/lib/perl/5.8.8/CORE" Prelude.c gcc: unrecognized option @-KPIC' gcc: language arch=v8 not recognized gcc: Prelude.c: linker input file unused because linking not done rm -f blib/arch/auto/Prelude/Prelude.so LD_RUN_PATH="" cc -L../../src/.libs -D_REENTRANT -pthreads -G -L/opt/csw/bdb44/lib -L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib Prelude.o -o blib/arch/auto/Prelude/Prelude.so \ -L/root/IDS/prelude/libprelude-0.9.17.2/bindings/perl/../../src/.libs -lprelude \ sh: cc: not found *** Error code 1 make: Fatal error: Command failed for target @blib/arch/auto/Prelude/Prelude.so' Current working directory /root/IDS/prelude/libprelude-0.9.17.2/bindings/perl *** Error code 1 make: Fatal error: Command failed for target @perl-build' Current working directory /root/IDS/prelude/libprelude-0.9.17.2/bindings *** Error code 1 The following command caused the error: failcom='exit 1'; \ for f in x $MAKEFLAGS; do \ case $f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=@echo all-recursive | sed s/-recursive//@; \ list='libltdl libmissing m4 src prelude-admin bindings docs'; for subdir in $list; do \ echo "Making $target in $subdir"; \ if test "$subdir" = "."; then \ dot_seen=yes; \ local_target="$target-am"; \ else \ local_target="$target"; \ fi; \ (cd $subdir && make $local_target) \ || eval $failcom; \ done; \ if test "$dot_seen" = "no"; then \ make "$target-am" || exit 1; \ fi; test -z "$fail" make: Fatal error: Command failed for target @all-recursive' Current working directory /root/IDS/prelude/libprelude-0.9.17.2 *** Error code 1 make: Fatal error: Command failed for target @all'
History
#1 Updated by Yoann VANDOORSELAERE almost 16 years ago
Could you please provides the generated Makefile, as it is in bindings/perl/Makefile.
Additionally, please generate and provide a second, manually generated Makefile:
cd bindings/perl/ rm -f Makefile perl Makefile.PL INSTALLDIRS=site
#2 Updated by almost 16 years ago
I have uploaded both Makefile in zip form. Makefile_1st is ./configure/make generated and other i have generated as you asked.
Thanks
#3 Updated by Yoann VANDOORSELAERE almost 16 years ago
Thanks!
Using the newly generated Makefile, does the build fail if you goes to the bindings/perl directory and run make?
#4 Updated by Pierre Chifflier almost 16 years ago
Some interesting comments for the exact same problem here:
[http://cpan.org/modules/by-module/Compress/Compress-Raw-Bzip2-2.004.readme]
Quoting the text:
Solaris build fails with "gcc: unrecognized option @-KPIC'"¶
You are running Solaris and you get an error like this when you try to
build this Perl module
gcc: unrecognized option @-KPIC'
This symptom usually means that you are using a Perl binary that has been
built with the Sun C compiler, but you are using gcc to build this module.
When Perl builds modules that need a C compiler, it will attempt to use
the same C compiler and command line options that was used to build perl
itself. In this case "-KPIC" is a valid option for the Sun C compiler,
but not for gcc. The equivalent option for gcc is "-fPIC".
The solution is either:
1. Build both Perl and this module with the same C compiler, either
by using the Sun C compiler for both or gcc for both.
2. Try generating the Makefile for this module like this perl
perl Makefile.PL CC=gcc CCCDLFLAGS=-fPIC OPTIMIZE=" " LD=gcc make testThis second option seems to work when mixing a Perl binary built
with the Sun C compiler and this module built with gcc. Your
mileage may vary.
#5 Updated by Yoann VANDOORSELAERE almost 16 years ago
Would you be able to try a test tarball, to see if it automatically fixes your issue?
#6 Updated by Yoann VANDOORSELAERE about 15 years ago
- Project changed from PRELUDE SIEM to Libprelude
- Category deleted (
1) - Target version deleted (
92)
#7 Updated by Yoann VANDOORSELAERE about 15 years ago
- Target version set to 0.9.22
#8 Updated by Yoann VANDOORSELAERE about 15 years ago
- Target version changed from 0.9.22 to 0.9.23
#9 Updated by Yoann VANDOORSELAERE almost 15 years ago
- Target version deleted (
0.9.23)
#10 Updated by Thomas ANDREJAK almost 8 years ago
- Status changed from New to Closed
- Assignee set to Thomas ANDREJAK
No activity