Ticket #1392 (closed bug: fixed)

Opened 12 years ago

Last modified 11 years ago

build parrot failed on CentOS 4.5

Reported by: flw Owned by: jkeenan
Priority: normal Milestone:
Component: configure Version: 1.9.0
Severity: medium Keywords:
Cc: jkeenan Language:
Patch status: Platform:

Description (last modified by jimmy) (diff)

Summary: build parrot failed on CentOS 4.5
Reported by: su2admin@gmail.com
---
error message:

/usr/bin/perl tools/build/parrot_config_c.pl --mini > \
    src/null_config.c
src/null_config.c
gcc -o miniparrot src/main.o src/null_config.o \
        -Wl,-rpath=/home/flw/soft/rakudo-rakudo-8dc1895/parrot/blib/lib -L/home/flw/soft/rakudo-rakudo-8dc1895/parrot/blib/lib -lparrot  -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline -lncurses  -L/usr/local/lib -Wl,-E
src/main.o(.text+0x46): In function `main':
src/main.c:51: undefined reference to `Parrot_new'
src/main.o(.text+0x50):src/main.c:52: undefined reference to `imcc_initialize'
src/main.o(.text+0x69):src/main.c:57: undefined reference to `Parrot_str_new'
src/main.o(.text+0x75):src/main.c:57: undefined reference to `Parrot_set_executable_name'
src/main.o(.text+0x8b):src/main.c:59: undefined reference to `parseflags'
src/main.o(.text+0xa5):src/main.c:60: undefined reference to `imcc_run'
src/main.o(.text+0xad):src/main.c:64: undefined reference to `Parrot_destroy'
src/main.o(.text+0xbd):src/main.c:65: undefined reference to `Parrot_exit'
src/null_config.o(.text+0x24): In function `Parrot_set_config_hash':
src/null_config.c:29: undefined reference to `Parrot_set_config_hash_internal'
collect2: ld returned 1 exit status
gmake: *** [miniparrot] error 1
Command failed (status 512): gmake install-dev
===SORRY!===
Unable to locate parrot_config

To automatically checkout (svn) and build a copy of parrot r43076,
try re-running Configure.pl with the '--gen-parrot' option.
Or, use the '--parrot-config' option to explicitly specify
the location of parrot_config to be used to build Rakudo Perl.



I can fix it on my machine via following changes:

$ LANG=C svn info
Path: .
URL: https://svn.parrot.org/parrot/trunk
Repository UUID: d31e2699-5ff4-0310-a27c-f18f2fbe73fe
Revision: 43076
Node Kind: directory
Schedule: normal
Last Changed Author: barney
Last Changed Rev: 43075
Last Changed Date: 2009-12-16 03:24:30 +0800 (Wed, 16 Dec 2009)
Properties Last Updated: 2009-12-24 11:01:48 +0800 (Thu, 24 Dec 2009)

$ LANG=C svn diff
Index: config/auto/warnings.pm
===================================================================
--- config/auto/warnings.pm     (revision 43076)
+++ config/auto/warnings.pm     (working copy)
@@ -38,7 +38,6 @@
     # sorted as "-Wfoo", so we can turn off/on as needed.
     my @potential_warnings = qw(
         -falign-functions=16
-        -fvisibility=hidden
         -funit-at-a-time
         -maccumulate-outgoing-args
         -W
$



---
osname= linux
osvers= 2.6.9-42.elsmp
arch=   i386-linux-thread-multi
cc=     gcc
---
Flags:
    category=install
    severity=medium
    ack=no
---
Summary of my parrot 1.9.0 (r43076) configuration:
  configdate='Thu Dec 24 03:26:11 2009 GMT'
  Platform:
    osname=linux, archname=i386-linux-thread-multi
    jitcapable=0, jitarchname=nojit,
    jitosname=linux, jitcpuarch=i386
    execcapable=0
    perl=/usr/bin/perl
  Compiler:
    cc='gcc', ccflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING  -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 -funit-at-a-time -maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wno-missing-format-attribute -Wpacked -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -DHAS_GETTEXT',
  Linker and Libraries:
    ld='gcc', ldflags=' -L/usr/local/lib',
    cc_ldflags='',
    libs='-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline -lncurses '
  Dynamic Linking:
    share_ext='.so', ld_share_flags='-shared -L/usr/local/lib -fPIC',
    load_ext='.so', ld_load_flags='-shared -L/usr/local/lib -fPIC'
  Types:
    iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
    ptrsize=4, ptr_alignment=1 byteorder=1234,
    nv=double, numvalsize=8, doublesize=8, longdoublesize=12

---
Environment:
    HOME =/home/flw
    LANG =zh_CN
    LANGUAGE  (unset)
    LD_LIBRARY_PATH  (unset)
    LOGDIR  (unset)
    PATH =/home/flw/bin:.:/usr/local/squid/sbin:/usr/local/squid/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/sbin:/sbin:.
    SHELL =/bin/bash

$ lsb_release -a
LSB Version:    :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: CentOS
Description:    CentOS release 4.5 (Final)
Release:        4.5
Codename:       Final
$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)
$

Attachments

bug.txt Download (5.7 KB) - added by flw 12 years ago.
BUG Description

Change History

Changed 12 years ago by flw

BUG Description

  Changed 12 years ago by jkeenan

Do we have anyone on CentOS who could re-test this?

Thank you very much.

kid51

  Changed 12 years ago by flw

This bug is still exists in trunk.

flw@waker:~/parrot$ LANG=C svn info Path: . URL:  https://svn.parrot.org/parrot/trunk Repository UUID: d31e2699-5ff4-0310-a27c-f18f2fbe73fe Revision: 47793 Node Kind: directory Schedule: normal Last Changed Author: tcurtis Last Changed Rev: 47793 Last Changed Date: 2010-06-24 11:15:00 +0800 (Thu, 24 Jun 2010) Properties Last Updated: 2010-06-23 18:01:22 +0800 (Wed, 23 Jun 2010)

flw@waker:~/parrot$

  Changed 12 years ago by flw

 http://gcc.gnu.org/wiki/Visibility

Perhaps this bug only exists on gcc 3.x

follow-up: ↓ 5   Changed 12 years ago by jimmy

Per  http://gcc.gnu.org/wiki/Visibility, GCC 3.x doesn't support -fvisibility=hidden.

in reply to: ↑ 4 ; follow-up: ↓ 6   Changed 12 years ago by doughera

Per  http://gcc.gnu.org/wiki/Visibility, GCC 3.x doesn't support -fvisibility=hidden.

Right, but Configure.pl is supposed to automatically check and only include -fvisibility=hidden if the compiler accepts it. The output of Configure.pl --verbose-step=auto::warnings might be informative here. I just tried that flag with

gcc version 3.4.6 (Debian 3.4.6-9)

and it complained with

cc1: error: unrecognized command line option "-fvisibility=hidden"

and Configure.pl did not include it in the build.

Further, looking at the attached  http://trac.parrot.org/parrot/attachment/ticket/1392/bug.txt|bug.txt, I don't see -fvisibility=hidden anywhere in the output. I suspect that something else entirely different is going on. For starters, it's probably best to separate this from the Rakudo build. Try building with a fresh download in a clean directory with as few Configure.pl options as possible.

in reply to: ↑ 5 ; follow-up: ↓ 8   Changed 12 years ago by jkeenan

Replying to doughera:

Right, but Configure.pl is supposed to automatically check and only include -fvisibility=hidden if the compiler accepts it. The output of Configure.pl --verbose-step=auto::warnings might be informative here. I just tried that flag with {{{ gcc version 3.4.6 (Debian 3.4.6-9)

Andy: How did you call Configure.pl to pass -fvisibility=hidden? (I don't see it in the list of eligible CL options in lib/Parrot/Configure/Options/Conf/Shared.pm.)

That aside, I too just tried building with cc=/usr/bin/gcc-3.3 verbose-step=autowarnings on Debian Linux. visibility was correctly excluded from the build (as indicated by its absence from lib/Parrot/Config/Generated.pm) and Parrot built successfully with no mention of visibility in the make log.

kid51

  Changed 12 years ago by jkeenan

  • cc jkeenan added
  • component changed from none to configure

in reply to: ↑ 6   Changed 12 years ago by doughera

Replying to jkeenan:

Andy: How did you call Configure.pl to pass -fvisibility=hidden? (I don't see it in the list of eligible CL options in lib/Parrot/Configure/Options/Conf/Shared.pm.)

I didn't. I ran Configure.pl --verbose-step=auto::warnings , noted the compile command used to test for -fvisibility=hidden, and then ran that command manually. That's what gave me the cc1: error: I quoted above.

That aside, I too just tried building with cc=/usr/bin/gcc-3.3 verbose-step=autowarnings on Debian Linux. visibility was correctly excluded from the build (as indicated by its absence from lib/Parrot/Config/Generated.pm) and Parrot built successfully with no mention of visibility in the make log.

Correct. Exactly. That's what Configure.pl is supposed to do, and what it did for me. And near as I can tell from the bug report, that's exactly what Configure.pl did on the original report. I really think the problem is elsewhere, and the visibility stuff is irrelevant.

follow-up: ↓ 11   Changed 12 years ago by jimmy

per flw, removing -fvisibility=hidden from config/auto/warnings.pm worked for him. So parrot needs to detect gcc < 4.0 on non-windows platform?

  Changed 12 years ago by jimmy

  • description modified (diff)

in reply to: ↑ 9   Changed 12 years ago by jkeenan

Replying to jimmy:

per flw, removing -fvisibility=hidden from config/auto/warnings.pm worked for him. So parrot needs to detect gcc < 4.0 on non-windows platform?

jimmy,

Both Andy Dougherty and I configured Parrot with a gcc < 4.0 on a non-Windows platform. Configure.pl correctly handled that case, i.e., it did not add visibility to the configuration and it subsequently built Parrot correctly. So it does not appear that Configure.pl is doing anything incorrectly, which suggests that flw's problem lies elsewhere.

kid51

follow-up: ↓ 13   Changed 11 years ago by jkeenan

We have not received further complaints in this area for more than 6 months.

If there is anyone who can do a smoke test of Parrot on CentOS in the next week, please post a summary of the results in this ticket.

Otherwise, I will close this ticket in a week or two.

Thank you very much.

kid51

in reply to: ↑ 12 ; follow-up: ↓ 14   Changed 11 years ago by doughera

Replying to jkeenan:

We have not received further complaints in this area for more than 6 months.

I now suspect that this is another example of the problem of patched gcc-3.4 versions. That issue should have been addressed by TT #1862. Unless you hear otherwise, this should be safe to close.

in reply to: ↑ 13   Changed 11 years ago by jkeenan

  • owner set to jkeenan
  • status changed from new to assigned

Replying to doughera:

Unless you hear otherwise, this should be safe to close.

Not having heard otherwise, I will take it and immediately close it.

kid51

  Changed 11 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.