Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build 5.14.2 on Ubuntu 11.04 with user-installed gcc #11679

Closed
p5pRT opened this issue Sep 29, 2011 · 14 comments
Closed

Can't build 5.14.2 on Ubuntu 11.04 with user-installed gcc #11679

p5pRT opened this issue Sep 29, 2011 · 14 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 29, 2011

Migrated from rt.perl.org#100374 (status was 'resolved')

Searchable as RT100374$

@p5pRT
Copy link
Author

p5pRT commented Sep 29, 2011

From rmbarker.cpan@btinternet.com

Created by rmbarker.cpan@btinternet.com

When I try to build perl 5.14.2 on Ubuntu 11.04 and gcc 4.6
I get errors due to missing libm.so

I fixed this with Configure -Dplibpth=/usr/lib/i386-linux-gnu

The problem is because I have installed gcc 4.6 but this does
not find find /usr/lib/i386-linux-gnu with gcc -print-search-dirs

This is fixed in blead with commit dcffd84 and I think this
should be cherry-picked for maint-5.14

Perl Info

Flags:
    category=install
    severity=medium

Site configuration information for perl 5.14.2:

Configured by robin at Wed Sep 28 00:38:43 BST 2011.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
  Commit id: dc281e6088d189558b79a5121119b7196c8b3db0
  Platform:
    osname=linux, osvers=2.6.38-11-generic, archname=i686-linux-64int
    uname='linux spade-ubuntu 2.6.38-11-generic #50-ubuntu smp mon sep
12 21:18:14 utc 2011 i686 i686 i386 gnulinux '
    config_args='-des -Dcc=gcc -Doptimize=-O2
-Wno-unused-but-set-variable -DDEBUGGING -Duse64bitint -Dman3dir=none
-Dcf_email=rmbarker.cpan@btinternet.com
-Dplibpth=/usr/lib/i386-linux-gnu'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-O2 -Wno-unused-but-set-variable -g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
    ccversion='', gccversion='4.6.1', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib'

libpth=/usr/local/lib /usr/lib/i386-linux-gnu /lib /usr/lib /usr/lib64
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.13'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2
-Wno-unused-but-set-variable -g -L/usr/local/lib -fstack-protector'

Locally applied patches:
    


@INC for perl 5.14.2:
    /usr/local/lib/perl5/site_perl/5.14.2/i686-linux-64int
    /usr/local/lib/perl5/site_perl/5.14.2
    /usr/local/lib/perl5/5.14.2/i686-linux-64int
    /usr/local/lib/perl5/5.14.2
    /usr/local/lib/perl5/site_perl/5.14.1/i686-linux-64int
    /usr/local/lib/perl5/site_perl/5.14.1
    /usr/local/lib/perl5/site_perl/5.14.0/i686-linux-64int
    /usr/local/lib/perl5/site_perl/5.14.0
    /usr/local/lib/perl5/site_perl/5.12.3
    /usr/local/lib/perl5/site_perl/5.12.1
    /usr/local/lib/perl5/site_perl/5.12.0
    /usr/local/lib/perl5/site_perl
    .


Environment for perl 5.14.2:
    HOME=/home/robin
    LANG=en_GB.UTF-8
    LANGUAGE=en_GB:en
    LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/lib/i386-linux-gnu
    LOGDIR (unset)

PATH=/home/robin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


@p5pRT
Copy link
Author

p5pRT commented Dec 6, 2011

From @jkeenan

On Thu Sep 29 07​:42​:07 2011, rmbarker.cpan@​btinternet.com wrote​:

When I try to build perl 5.14.2 on Ubuntu 11.04 and gcc 4.6
I get errors due to missing libm.so

I fixed this with Configure -Dplibpth=/usr/lib/i386-linux-gnu

The problem is because I have installed gcc 4.6 but this does
not find find /usr/lib/i386-linux-gnu with gcc -print-search-dirs

This is fixed in blead with commit dcffd84 and I think this
should be cherry-picked for maint-5.14

Can anyone confirm whether this has indeed been fixed in blead?

Is it important enough to be cherry-picked for any possible 5.14.3?

Thank you very much.
Jim keenan

@p5pRT
Copy link
Author

p5pRT commented Dec 6, 2011

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 4, 2012

From gustavo@gnustavo.com

On Mon Dec 05 18​:12​:56 2011, jkeenan wrote​:

Can anyone confirm whether this has indeed been fixed in blead?

I'm using Ubuntu 11.10 and couldn't compile blead as of
2d1dec4. The error is exactly the same.

Since I'm using a 64 bits kernel I was able to compile perl-5.14.2
passing '-Dplibpth=/usr/lib/x86_64-linux-gnu' instead of '-
Dplibpth=/usr/lib/i386-linux-gnu' to ./Configure.

@p5pRT
Copy link
Author

p5pRT commented Feb 6, 2012

From @doughera88

On Sat, 4 Feb 2012, Gustavo Chaves via RT wrote​:

On Mon Dec 05 18​:12​:56 2011, jkeenan wrote​:

Can anyone confirm whether this has indeed been fixed in blead?

I'm using Ubuntu 11.10 and couldn't compile blead as of
2d1dec4. The error is exactly the same.

Since I'm using a 64 bits kernel I was able to compile perl-5.14.2
passing '-Dplibpth=/usr/lib/x86_64-linux-gnu' instead of '-
Dplibpth=/usr/lib/i386-linux-gnu' to ./Configure.

Could you please explain in more detail exactly what you did and what you
found? I'm confused.

Specifically, perl-5.14.2 should compile out of the box on Ubuntu 10.11
with the system gcc. Blead should also compile with either the system gcc
or a private gcc, unless something unusual is going on with the library
directories that is significantly different between the system and the
private gcc.

via perlbug​: queue​: perl5 status​: open
https://rt-archive.perl.org/perl5/Ticket/Display.html?id=100374

Thanks,

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Feb 7, 2012

From gustavo@gnustavo.com

2012/2/6 Andy Dougherty via RT <perlbug-followup@​perl.org>

Could you please explain in more detail exactly what you did and what you
found? I'm confused.

Sorry.

This is my environment​:

$ uname -a
Linux gnu 3.0.17-030017-generic #201201261553 SMP Thu Jan 26 15​:55​:44 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Ubuntu 11.10 \n \l

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target​: x86_64-linux-gnu
Configured with​: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3' --with-bugurl=file​:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model​: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

I've cloned Perl's git repo from git​://perl5.git.perl.org/perl.git and
pulled it up to b3100a1.

Then, I tried to compile it with "./Configure -des -Dprefix=$HOME/localperl
-Dusedevel; make" and got the following error​:

<...>
  CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89
-O2 -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels
-Wc++-compat -Wwrite-strings
cc -fstack-protector -L/usr/local/lib -o miniperl \
  perlmini.o opmini.o miniperlmain.o gv.o toke.o perly.o pad.o
regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o
pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o
taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o
locale.o pp_pack.o pp_sort.o
pp.o​: In function `Perl_pp_pow'​:
pp.c​:(.text+0x31ce)​: undefined reference to `pow'
pp.o​: In function `Perl_pp_modulo'​:
pp.c​:(.text+0x3f95)​: undefined reference to `floor'
pp.c​:(.text+0x412f)​: undefined reference to `floor'
pp.c​:(.text+0x4290)​: undefined reference to `fmod'
<...>

If I build it like this "./Configure -des -Dprefix=$HOME/localperl
-Dusedevel *-Dplibpth=/usr/lib/x86_64-linux-gnu*; make" then it works. That
part that caused error runs like this​:

<...>
  CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BIT
S=64 -std=c89 -O2 -Wall -ansi -W -Wextra -Wdeclaration-after-statement
-Wendif-labels -Wc++-compat -Wwrite-strings
cc -fstack-protector -L/usr/local/lib -o miniperl \
  perlmini.o opmini.o miniperlmain.o gv.o toke.o perly.o pad.o
regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o
pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o
taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o
locale.o pp_pack.o pp_sort.o -lnsl -ldl -lm -lcrypt -lutil -lc
./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
<...>

--
Gustavo.

@p5pRT
Copy link
Author

p5pRT commented Feb 7, 2012

From @doughera88

On Tue, 7 Feb 2012, Gustavo Chaves wrote​:

2012/2/6 Andy Dougherty via RT <perlbug-followup@​perl.org>
Could you please explain in more detail exactly what you did and
what you
found?  I'm confused.

Sorry.

This is my environment​:

  $ uname \-a

Linux gnu 3.0.17-030017-generic #201201261553 SMP Thu Jan 26 15​:55​:44
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Ubuntu 11.10 \n \l

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target​: x86_64-linux-gnu
Configured with​: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3'
--with-bugurl=file​:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model​: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 

Ok, so this is the stock gcc supplied by Ubuntu, right? (The original bug
report had to do with a user-installed gcc.)

I've cloned Perl's git repo from git​://perl5.git.perl.org/perl.git and
pulled it up to b3100a1d0ee80a210e6330922fa4c78edffb7d52.

Then, I tried to compile it with "./Configure -des -Dprefix=$HOME/localperl
-Dusedevel; make" and got the following error​:

  \<\.\.\.>

 CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -std=c89 -O2  -Wall -ansi -W -Wextra
-Wdeclaration-after-statement -Wendif-labels -Wc++-compat
-Wwrite-strings 
cc -fstack-protector -L/usr/local/lib -o miniperl \
   perlmini.o opmini.o miniperlmain.o   gv.o toke.o perly.o pad.o
regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o
pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o
utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o
numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   
pp.o​: In function `Perl_pp_pow'​:
pp.c​:(.text+0x31ce)​: undefined reference to `pow'
pp.o​: In function `Perl_pp_modulo'​:
pp.c​:(.text+0x3f95)​: undefined reference to `floor'
pp.c​:(.text+0x412f)​: undefined reference to `floor'
pp.c​:(.text+0x4290)​: undefined reference to `fmod'
<...>

Yup, this somehow missed the libraries, even though blead's hints are
supposed to pick them up.

I wonder if we're running the wrong gcc command, or if the output has
changed, or if something else entirely is going on.

First, could you check whether 'gcc' and '/usr/bin/gcc' are the same?
(The hints file prefers /usr/bin/gcc.)

Next, could you run

  /usr/bin/gcc -print-search-dirs

and post the results?

Thanks for your patience,

--
  Andy Dougherty doughera@​lafayette.edu

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2013

From @jkeenan

On Tue Feb 07 08​:23​:15 2012, doughera wrote​:

On Tue, 7 Feb 2012, Gustavo Chaves wrote​:

2012/2/6 Andy Dougherty via RT <perlbug-followup@​perl.org>
Could you please explain in more detail exactly what you did
and
what you
found? �I'm confused.

Sorry.

This is my environment​:

  $ uname \-a

Linux gnu 3.0.17-030017-generic #201201261553 SMP Thu Jan 26
15​:55​:44
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Ubuntu 11.10 \n \l

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target​: x86_64-linux-gnu
Configured with​: ../src/configure -v
--with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3'
--with-bugurl=file​:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model​: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)�

Ok, so this is
the stock gcc supplied by Ubuntu, right? (The original bug
report had to do with a user-installed gcc.)

I've cloned Perl's git repo from�git​://perl5.git.perl.org/perl.git
and
pulled it up to�b3100a1d0ee80a210e6330922fa4c78edffb7d52.

Then, I tried to compile it with "./Configure -des
-Dprefix=$HOME/localperl
-Dusedevel; make" and got the following error​:

  \<\.\.\.>

�CCCMD = �cc -DPERL_CORE -c -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 �-std=c89 -O2 �-Wall -ansi -W -Wextra
-Wdeclaration-after-statement -Wendif-labels -Wc++-compat
-Wwrite-strings�
cc -fstack-protector -L/usr/local/lib -o miniperl
\
� �perlmini.o opmini.o miniperlmain.o � gv.o toke.o perly.o pad.o
regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o
run.o
pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o
utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o
numeric.o mathoms.o locale.o pp_pack.o pp_sort.o ��
pp.o​: In
function `Perl_pp_pow'​:
pp.c​:(.text+0x31ce)​: undefined reference to `pow'
pp.o​: In function `Perl_pp_modulo'​:
pp.c​:(.text+0x3f95)​: undefined reference to `floor'
pp.c​:(.text+0x412f)​: undefined reference to `floor'
pp.c​:(.text+0x4290)​: undefined reference to `fmod'
<...>

Yup, this somehow missed the libraries, even though blead's hints are
supposed to pick them up.

I wonder if we're running the wrong gcc command, or if the output has
changed, or if something else entirely is going on.

First, could you check whether 'gcc' and '/usr/bin/gcc' are the same?
(The hints file prefers /usr/bin/gcc.)

Next, could you run

/usr/bin/gcc \-print\-search\-dirs

and post the results?

Thanks for your patience,

I'm moving this RT into the Stalled category because it does seem as if
there are real problems here, but the poster hasn't responded to Andy
D's diagnostic questions.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2013

@jkeenan - Status changed from 'open' to 'stalled'

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2013

From @jmdh

On Sun Feb 03 10​:25​:33 2013, jkeenan wrote​:

On Tue Feb 07 08​:23​:15 2012, doughera wrote​:

Yup, this somehow missed the libraries, even though blead's hints
are
supposed to pick them up.

I wonder if we're running the wrong gcc command, or if the output
has
changed, or if something else entirely is going on.

First, could you check whether 'gcc' and '/usr/bin/gcc' are the
same?
(The hints file prefers /usr/bin/gcc.)

Next, could you run

/usr/bin/gcc \-print\-search\-dirs

and post the results?

Thanks for your patience,

I'm moving this RT into the Stalled category because it does seem as
if
there are real problems here, but the poster hasn't responded to Andy
D's diagnostic questions.

Thank you very much.
Jim Keenan

Might have been the problem fixed by
ea7b281 which is included in 5.14.3?

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2013

The RT System itself - Status changed from 'stalled' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2013

From rmbarker.cpan@btinternet.com

I think you have been trying to contact me re this bug - sorry to be
unresponsive.

I have not been able to check that the bug is resolved, as I do not have
Ubuntu 11.04 and the version I now have (Ubuntu 11.10) does not exhibit
the bug.

But when I originally investigated the bug, I applied commit
dcffd84 from blead to the maint-5.14 branch and this solved the
bug. As that commit has been applied to 5.14, I have every expectation
that the bug has been resolved and I suggest this bug should be closed.

Robin

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2013

From @jkeenan

On Sun Apr 21 15​:21​:24 2013, rmbarker.cpan@​btinternet.com wrote​:

I think you have been trying to contact me re this bug - sorry to be
unresponsive.

I have not been able to check that the bug is resolved, as I do not have
Ubuntu 11.04 and the version I now have (Ubuntu 11.10) does not exhibit
the bug.

But when I originally investigated the bug, I applied commit
dcffd84 from blead to the maint-5.14 branch and this solved the
bug. As that commit has been applied to 5.14, I have every expectation
that the bug has been resolved and I suggest this bug should be closed.

Robin

Resolving this ticket per recommendation from original requestor.

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2013

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant