problem to compile gprolog with gcc-3.2 (Mandrake 9.0)

Rémy Haemmerlé <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Hi,

Two persons have already reported problems for compiling gprolog with
mandrake 9.0 .
In fact the problem seems come from the version of gcc used for
compiling (version 3.2 by default in Mandrake 9.0). After some tests, I
think that the flag -fomit-frame-pointer has no effect in this version
of gcc.

Therefore to avoid this problem there are two solutions:
    - Either the ebp register must be disabled using the following
command lines:
            ./configure --disable-ebp
            make
    - Or gprolog must be compile with an other version of gcc, for
example gcc-2.96 available in the same distribution:
            export CC=gcc-2.96
            ./configure
            make

Is the problem only appended in Mandrake 9.0?
Has somebody such troubles using gcc-3.2 in a different distribution?
Has somebody information about gcc-3.2 and flag -fomit-frame-pointer?


Rémy.



levasseur vincent wrote :

> Hi people,
>
> I have a problem with install :
> My config :
>
> Mandrake 9.0
> Kernel 2.4.19
> KDE 3.0
> Duron 1.2 Ghz / 256 DDR-RAM
>
> When i do "make", the compilation failed on this :
>
> make[1]: Entre dans le repertoire
> '/home/liondrys/prog/prolog/gprolog-1.2.16/src/Fd2C'
> gplc -c --fast-math fd2c.pl
> compilation failed
> make[1]: *** [fd2c.o] Erreur 1
>
> So, what can I do ? :)
>
> Thanks for all
>
> V.levasseur
>
> _______________________________________________
> Bug-prolog mailing list
> [email protected]
> http://mail.gnu.org/mailman/listinfo/bug-prolog



Jean Michel LECONTE wrote :

> Hello i got the mandrake 9.0 and i tried to install gnu prolog 1.2.16
but it
> does an error during the compilation.
> It doesnt find a file when compiling Fd2C but thts working when i do
it
> manually. It does that for every files after Fd2c in the compilation
phase.
>
> How to solve it ??
>
> Jean Michel LECONTE
>
>
>
>
>
> [jm@dgse-server src]$ ./configure
> checking for gcc... gcc
> checking for C compiler default output... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for executable suffix...
> checking for object suffix... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for ranlib... ranlib
> checking whether make sets ${MAKE}... yes
> checking for a BSD compatible install... /usr//bin/install -c
> checking whether ln -s works... yes
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking how to run the C preprocessor... gcc -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... yes
> checking for unistd.h... yes
> checking for long... yes
> checking size of long... 4
> checking for sys/ioctl_compat.h... no
> checking for termios.h... yes
> checking for malloc.h... yes
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for getpagesize... yes
> checking for working mmap... yes
> checking for mallopt... yes
> checking for fgetc... yes
> checking for gcc option to accept ANSI C... none needed
> checking for inline... inline
> use ebp and move -fomit-frame-pointer to CFLAGS_MACHINE
> checking for socket... yes
> checking for gethostbyname... yes
> DIRECTORIES
>  --> Installation:       /usr/local/gprolog-1.2.16
>  --> Link to binaries:   /usr/local/bin
>  --> Documentation:      /usr/local/gprolog-1.2.16/doc
>  --> HTML documentation: /usr/local/gprolog-1.2.16/doc/Html
>  --> Examples:           /usr/local/gprolog-1.2.16
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating TopComp/Makefile
> config.status: creating Pl2Wam/Makefile
> config.status: creating Wam2Ma/Makefile
> config.status: creating Ma2Asm/Makefile
> config.status: creating Fd2C/Makefile
> config.status: creating Linedit/Makefile
> config.status: creating W32GUICons/Makefile
> config.status: creating EnginePl/Makefile
> config.status: creating BipsPl/Makefile
> config.status: creating EngineFD/Makefile
> config.status: creating BipsFD/Makefile
> config.status: creating EnginePl/gp_config.h
> config.status: EnginePl/gp_config.h is unchanged
> [jm@dgse-server src]$ make
> (cd EnginePl; make config)
> make[1]: Entre dans le répertoire
`/home/jm/gprolog-1.2.16/src/EnginePl'
> gcc -O3   -o pl_config pl_config.c
> ./pl_config
>
>        -------------------------------
>        --- GNU PROLOG INSTALLATION ---
>        -------------------------------
>
> GNU Prolog version: 1.2.16 (Sep 19 2002)
> Operating system  : linux-gnu
> Processor         : i686
> Size of a word    : 32 bits
> C compiler        : gcc
> C flags           : -O3
> C flags machine   : -mcpu=pentiumpro -fomit-frame-pointer
> Loader flags      :
> Loader libraries  : -lm
> Use line editor   : Yes
> Use piped consult : Yes
> Use sockets       : Yes
> Use FD solver     : Yes
> Use fast call     : Yes
> Use machine regs. : Yes
> Used register(s)  : ebx ebp
>
>        ------------------------------
>
> (cd ../TopComp; make gplc)
> make[2]: Entre dans le répertoire
`/home/jm/gprolog-1.2.16/src/TopComp'
> gcc -O3  -o gplc top_comp.c -lm
> make[2]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/TopComp'
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/EnginePl'
> . ./SETVARS;for i in TopComp EnginePl Wam2Ma Ma2Asm Linedit BipsPl
Pl2Wam
> Fd2C E
> ngineFD BipsFD;do (cd $i; make) || exit 1; done;\
> (cd TopComp; make gprolog)
> make[1]: Entre dans le répertoire
`/home/jm/gprolog-1.2.16/src/TopComp'
> gcc -O3  -o hexgplc hexfilter.c
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/TopComp'
> make[1]: Entre dans le répertoire
`/home/jm/gprolog-1.2.16/src/EnginePl'
> gcc -O3   -o cpp_headers cpp_headers.c
> D=`(cd ..;for i in *;do test -d $i && X="$X
> /home/jm/gprolog-1.2.16/src/$i";done
> ;echo $X)`; ./cpp_headers headers.h gprolog.h $D
> gplc -c -C '-O3 ' obj_begin.c
> gplc -c -C '-O3 ' obj_end.c
> gplc -c -C '-O3 ' machine.c
> gplc -c -C '-O3 ' machine1.c
> gplc -c -C '-O3 ' mem_alloc.c
> gplc -c -C '-O3 ' misc.c
> gplc -c -C '-O3 ' hash.c
> gplc -c -C '-O3 ' obj_chain.c
> gplc -c -C '-O3 ' engine.c
> gplc -c engine1.c
> gplc -c -C '-O3 ' wam_inst.c
> gplc -c -C '-O3 ' atom.c
> gplc -c -C '-O3 ' pred.c
> gplc -c -C '-O3 ' oper.c
> gplc -c -C '-O3 ' if_no_fd.c
> gplc -c -C '-O3 ' main.c
> rm -f libengine_pl.a
> ar rc  libengine_pl.a machine.o machine1.o mem_alloc.o misc.o hash.o
> obj_chain.o
> engine.o engine1.o wam_inst.o atom.o pred.o oper.o if_no_fd.o main.o
> ranlib libengine_pl.a
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/EnginePl'
> make[1]: Entre dans le répertoire `/home/jm/gprolog-1.2.16/src/Wam2Ma'

> gcc -O3  -c wam2ma.c
> gcc -O3  -c wam_parser.c
> gcc -O3  -o wam2ma wam2ma.o wam_parser.o
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/Wam2Ma'
> make[1]: Entre dans le répertoire `/home/jm/gprolog-1.2.16/src/Ma2Asm'

> gcc -O3  -c ma2asm.c
> gcc -O3  -c ma_parser.c
> gcc -O3  -c ma2asm_inst.c
> gcc -O3  -o ma2asm ma2asm.o ma2asm_inst.o ma_parser.o
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/Ma2Asm'
> make[1]: Entre dans le répertoire
`/home/jm/gprolog-1.2.16/src/Linedit'
> gcc -c -mcpu=pentiumpro -fomit-frame-pointer -O3  linedit.c
> gcc -c -mcpu=pentiumpro -fomit-frame-pointer -O3  terminal.c
> gcc -c -mcpu=pentiumpro -fomit-frame-pointer -O3  ctrl_c.c
> rm -f liblinedit.a
> ar rc  liblinedit.a linedit.o terminal.o ctrl_c.o
> ranlib liblinedit.a
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/Linedit'
> make[1]: Entre dans le répertoire `/home/jm/gprolog-1.2.16/src/BipsPl'

> gplc -c -C '-O3  -funsigned-char' error_supp.c
> gplc -c -C '-O3  -funsigned-char' c_supp.c
> gplc -c -C '-O3  -funsigned-char' foreign_supp.c
> gplc -c -C '-O3  -funsigned-char' pred_supp.c
> gplc -c -C '-O3  -funsigned-char' term_supp.c
> gplc -c -C '-O3  -funsigned-char' stream_supp.c
> gplc -c -C '-O3  -funsigned-char' scan_supp.c
> gplc -c -C '-O3  -funsigned-char' parse_supp.c
> gplc -c -C '-O3  -funsigned-char' write_supp.c
> gplc -c -C '-O3  -funsigned-char' dynam_supp.c
> gplc -c -C '-O3  -funsigned-char' callinf_supp.c
> gplc -c -C '-O3  -funsigned-char' bc_supp.c
> gplc -c foreign.wam
> gplc -c pl_error.wam
> gplc -c utils.wam
> gplc -c unify.wam
> gplc -c assert.wam
> gplc -c -C '-O3  -funsigned-char' assert_c.c
> gplc -c read.wam
> gplc -c -C '-O3  -funsigned-char' read_c.c
> gplc -c write.wam
> gplc -c -C '-O3  -funsigned-char' write_c.c
> gplc -c print.wam
> gplc -c const_io.wam
> gplc -c -C '-O3  -funsigned-char' const_io_c.c
> gplc -c oper.wam
> gplc -c -C '-O3  -funsigned-char' oper_c.c
> gplc -c pred.wam
> gplc -c -C '-O3  -funsigned-char' pred_c.c
> gplc -c atom.wam
> gplc -c -C '-O3  -funsigned-char' atom_c.c
> gplc -c control.wam
> gplc -c -C '-O3  -funsigned-char' control_c.c
> gplc -c call.wam
> gplc -c call_args.wam
> gplc -c -C '-O3  -funsigned-char' call_args_c.c
> gplc -c catch.wam
> gplc -c throw.wam
> gplc -c -C '-O3  -funsigned-char' throw_c.c
> gplc -c flag.wam
> gplc -c -C '-O3  -funsigned-char' flag_c.c
> gplc -c arith_inl.wam
> gplc -c -C '-O3  -funsigned-char' arith_inl_c.c
> gplc -c type_inl.wam
> gplc -c -C '-O3  -funsigned-char' type_inl_c.c
> gplc -c term_inl.wam
> gplc -c -C '-O3  -funsigned-char' term_inl_c.c
> gplc -c g_var_inl.wam
> gplc -c -C '-O3  -funsigned-char' g_var_inl_c.c
> gplc -c all_solut.wam
> gplc -c -C '-O3  -funsigned-char' all_solut_c.c
> gplc -c sort.wam
> gplc -c -C '-O3  -funsigned-char' sort_c.c
> gplc -c list.wam
> gplc -c stat.wam
> gplc -c -C '-O3  -funsigned-char' stat_c.c
> gplc -c stream.wam
> gplc -c -C '-O3  -funsigned-char' stream_c.c
> gplc -c file.wam
> gplc -c -C '-O3  -funsigned-char' file_c.c
> gplc -c char_io.wam
> gplc -c -C '-O3  -funsigned-char' char_io_c.c
> gplc -c dec10io.wam
> gplc -c format.wam
> gplc -c -C '-O3  -funsigned-char' format_c.c
> gplc -c os_interf.wam
> gplc -c -C '-O3  -funsigned-char' os_interf_c.c
> gplc -c expand.wam
> gplc -c -C '-O3  -funsigned-char' expand_c.c
> gplc -c consult.wam
> gplc -c -C '-O3  -funsigned-char' consult_c.c
> gplc -c pretty.wam
> gplc -c -C '-O3  -funsigned-char' pretty_c.c
> gplc -c random.wam
> gplc -c -C '-O3  -funsigned-char' random_c.c
> gplc -c top_level.wam
> gplc -c -C '-O3  -funsigned-char' top_level_c.c
> gplc -c debugger.wam
> gplc -c -C '-O3  -funsigned-char' debugger_c.c
> gplc -c src_rdr.wam
> gplc -c -C '-O3  -funsigned-char' src_rdr_c.c
> gplc -c all_pl_bips.wam
> gplc -c sockets.wam
> gplc -c -C '-O3  -funsigned-char' sockets_c.c
> gplc -c le_interf.wam
> gplc -c -C '-O3  -funsigned-char' le_interf_c.c
> rm -f libbips_pl.a
> ar rc  libbips_pl.a error_supp.o c_supp.o foreign_supp.o pred_supp.o
> term_supp.o stream_supp.o scan_supp.o parse_supp.o write_supp.o
dynam_supp.o
> callinf_supp.o bc_supp.o foreign.o pl_error.o utils.o unify.o assert.o

> assert_c.o read.o read_c.o write.o write_c.o print.o const_io.o
const_io_c.o
> oper.o oper_c.o pred.o pred_c.o atom.o atom_c.o control.o control_c.o
call.o
> call_args.o call_args_c.o catch.o throw.o throw_c.o flag.o flag_c.o
> arith_inl.o arith_inl_c.o type_inl.o type_inl_c.o term_inl.o
term_inl_c.o
> g_var_inl.o g_var_inl_c.o all_solut.o all_solut_c.o sort.o sort_c.o
list.o
> stat.o stat_c.o stream.o stream_c.o file.o file_c.o char_io.o
char_io_c.o
> dec10io.o format.o format_c.o os_interf.o os_interf_c.o expand.o
expand_c.o
> consult.o consult_c.o pretty.o pretty_c.o random.o random_c.o
top_level.o
> top_level_c.o debugger.o debugger_c.o src_rdr.o src_rdr_c.o
all_pl_bips.o
> sockets.o sockets_c.o le_interf.o le_interf_c.o
> ranlib libbips_pl.a
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/BipsPl'
> make[1]: Entre dans le répertoire `/home/jm/gprolog-1.2.16/src/Pl2Wam'

> gplc -c pl2wam.wam
> gplc -c read_file.wam
> gplc -c bip_list.wam
> gplc -c syn_sugar.wam
> gplc -c internal.wam
> gplc -c code_gen.wam
> gplc -c reg_alloc.wam
> gplc -c inst_codif.wam
> gplc -c first_arg.wam
> gplc -c indexing.wam
> gplc -c wam_emit.wam
> [ ! -f  pl2wam ] || cp pl2wam pl2wam0
> gplc -o pl2wam --no-fd-lib --min-bips pl2wam.o read_file.o bip_list.o
> syn_sugar.o internal.o code_gen.o reg_alloc.o inst_codif.o first_arg.o

> indexing.o wam_emit.o
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/Pl2Wam'
> make[1]: Entre dans le répertoire `/home/jm/gprolog-1.2.16/src/Fd2C'
> gplc -c --fast-math fd2c.pl
> compilation failed
> make[1]: *** [fd2c.o] Erreur 1
> make[1]: Quitte le répertoire `/home/jm/gprolog-1.2.16/src/Fd2C'
> make: *** [all] Erreur 1
> [jm@dgse-server src]$ cd Fd2C/                    % here i compile
manually
> [jm@dgse-server Fd2C]$ gplc -c --fast-math fd2c.pl
> [jm@dgse-server Fd2C]$
>
> _______________________________________________
> Users-prolog mailing list
> [email protected]
> http://mail.gnu.org/mailman/listinfo/users-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.