Bug 9355

Summary: SWI-prolog bug due to incorrect configuration
Product: Mageia Reporter: Malo Deniélou <pmdenielou>
Component: RPM PackagesAssignee: Filipe Saraiva <mail>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: mail
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: swi-prolog CVE:
Status comment:

Description Malo Deniélou 2013-03-13 00:00:51 CET
When typing "swipl-ld -h" on the command line, I get the following:

/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../lib64/crt1.o: In function `_start':
/home/iurt/rpm/BUILD/glibc-2.14.1/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
collect2: ld returned 1 exit status
gcc returned code 256
*** swipl-ld exit status 1

The mention of /home/iurt/ hints to a packaging problem ...
Manuel Hiebel 2013-03-13 22:26:26 CET

Assignee: bugsquad => lists.jjorge
Source RPM: (none) => swi-prolog

Filipe Saraiva 2013-03-15 15:38:34 CET

CC: (none) => filip.saraiva

Comment 1 José Jorge 2013-03-21 07:28:57 CET
assigned to real maintainer

Status: NEW => ASSIGNED
Assignee: lists.jjorge => filip.saraiva

Comment 2 Filipe Saraiva 2013-03-25 22:29:00 CET
Hello,

I can reprodue this bug. I compiled SWI-Prolog from source code and I can see this error.

Can it be a problem associated to glibc or gcc?

Well, I will send this bug report to upstream.

Thank you;
Comment 3 Malo Deniélou 2013-03-26 12:56:45 CET
No, it's not a gcc or glibc problem, it's a problem showing that some PATHS are not setup correctly during build.
It can usually be fixed by giving the appropriate configure option.
/home/iurt/ is the directory in which the build system builds packages.
Comment 4 Filipe Saraiva 2013-04-03 15:19:00 CEST
Hi Malo,

"swipl-ld -h" don't work because "-h" is not a valid option to swipl-ld.

Try "swipl-ld -help". See:

$ swipl-ld -help
SWI-Prolog linker utility
swipl-ld comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

usage: swipl-ld -help
       swipl-ld [options] inputfile ...
       swipl-ld -shared -o out inputfile ...

options:
       -o out           define output file

       -v               verbose
       -f               fake (do not run any commands)
       -g               Compile/link for debugging
       --version        for GCC: run gcc --version

       -pl prolog       Prolog to use
       -ld linker       link editor to use
       -cc compiler     compiler for C source files
       -c++ compiler    compiler for C++ source files

       -c               only compile C/C++ files, do not link
       -S               emit assembler, do not link
       -E               only run preprocessor, do not link
       -build-defaults  use default parameters, don't ask Prolog
       -nostate         just relink the kernel
       -state           add a Prolog saved state
       -nolibswipl      do not link with -lswipl
       -shared          create target for load_foreign_library/2
       -embed-shared    embed Prolog in a shared object/DLL
       -fpic            compile small position-independent code
       -fPIC            compile large position-independent code

       -pl-options,...  Add options for Prolog
       -ld-options,...  Add options for linker
       -cc-options,...  Add options for C/C++-compiler
       -F base          Load    swi(base.rc)
       -goal goal       (Prolog) entry point
       -toplevel goal   (Prolog) abort toplevel goal
       -initfile file   (Prolog) profile file to load
       -class class     {runtime,kernel,development}

       -O*              Optimization passed to compiler
       -Wl,*            Options passed to linker
       -W*              Warning options passed to compiler

       -Dmacro          Define macro (C/C++)
       -Umacro          Undefine macro (C/C++)
       -Iincludedir     Include directory (C/C++)
       -Llibdir         Library directory (C/C++ link)
       -llib            library (C/C++)

I will close this bug. If you desire, you can reopen it.

Status: ASSIGNED => RESOLVED
Resolution: (none) => INVALID