Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bootstrap on Solaris Fails, Perl cannot find floor() ceil()
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Sat Jul 02, 2011 9:44 pm    Post subject: Bootstrap on Solaris Fails, Perl cannot find floor() ceil() Reply with quote

I'm following the instructions here:
http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml

I get to this step:
Code:
$ env FEATURES="-collision-protect" emerge --oneshot portage


and dependencies attempt to install perl (dev-lang/perl-5.12.3) only to fail with

Code:
    miniperlmain.o opmini.o perlmini.o
pp.o: In function `Perl_pp_int':
pp.c:(.text+0xb8a7): undefined reference to `floor'
pp.c:(.text+0xb8fa): undefined reference to `ceil'
pp.o: In function `Perl_pp_sin':
pp.c:(.text+0xbba1): undefined reference to `sqrt'
pp.c:(.text+0xbbb9): undefined reference to `sin'
pp.c:(.text+0xbbd1): undefined reference to `cos'
pp.c:(.text+0xbbe9): undefined reference to `exp'
pp.c:(.text+0xbc02): undefined reference to `log'
pp.o: In function `Perl_pp_atan2':
pp.c:(.text+0xbe96): undefined reference to `atan2'
pp.o: In function `Perl_pp_modulo':


Normally those functions are in /lib/libm.so.6 but no such file was installed. Additionally /lib/libm.so.6 is part of sys-libs/glibc but no such package is available.

Code:
$ emerge --oneshot glibc
 * Last emerge --sync was 88d 3m 40s ago.
Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "glibc".

emerge: searching for similar names...
emerge: Maybe you meant any of these: dev-libs/glib, sci-libs/galib, dev-java/cglib?


Does anyone know how to get past this?

Thanks
Back to top
View user's profile Send private message
grobian
Developer
Developer


Joined: 31 May 2006
Posts: 63

PostPosted: Sat Jul 09, 2011 8:19 am    Post subject: Reply with quote

Instead of emerging glibc (which is guaranteed to fail on Solaris), perl should link against libm, -lm.

Can you try emerging a lower version of perl?
_________________
Gentoo on a different level
Back to top
View user's profile Send private message
grobian
Developer
Developer


Joined: 31 May 2006
Posts: 63

PostPosted: Sat Jul 09, 2011 8:27 am    Post subject: Reply with quote

This feels like bug #358875
https://bugs.gentoo.org/show_bug.cgi?id=358875
_________________
Gentoo on a different level
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 362

PostPosted: Sat Jul 09, 2011 5:28 pm    Post subject: Reply with quote

I also experienced the same symptoms, but I think the actual problem was different. In either case, my bug report was here: https://bugs.gentoo.org/show_bug.cgi?id=353656
_________________
My 1U Dual 833 MHz Alphaserver DS20L
The AlphaLinux.org Wiki
Back to top
View user's profile Send private message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Wed Jul 20, 2011 2:41 am    Post subject: Reply with quote

Thank you for getting back to me about this.

I did try again with the attachment from comment number 5 on https://bugs.gentoo.org/attachment.cgi?id=276303

https://bugs.gentoo.org/show_bug.cgi?id=358875
"perl-5.12.3-modified2.ebuild (text/plain), 21.81 KB, created by Alexander Lam"

Code:
wget -O perl-5.12.3-modified2.ebuild 'https://bugs.gentoo.org/attachment.cgi?id=276303'
cp perl-5.12.3-modified2.ebuild /opt/gentoo/usr/portage/dev-lang/perl/perl-5.12.3.ebuild
cd /opt/gentoo/usr/portage/dev-lang/perl/
ebuild perl-5.12.3.ebuild digest
cd -
emerge --oneshot perl


Code:
>>> Emerging (1 of 2) dev-lang/perl-5.12.3
 * perl-5.12.3.tar.bz2 SHA1 SHA256 size ;-) ...                          [ ok ]
 * perl-5.12.3-1.tar.bz2 SHA1 SHA256 size ;-) ...                        [ ok ]
 * Package:    dev-lang/perl-5.12.3
 * Repository: gentoo_prefix
 * USE:        bootstrap elibc_SunOS kernel_SunOS prefix userland_GNU x64-solaris
 * FEATURES:   nostrip preserve-libs

...skip...

>>> Unpacking source...
>>> Unpacking perl-5.12.3.tar.bz2 to /opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work
>>> Unpacking perl-5.12.3-1.tar.bz2 to /opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work
find: bad option -mindepth
find: [-H | -L] path-list predicate-list
xargs: illegal option -- r
xargs: Usage: xargs: [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr] [-i[replstr]] [-L #] [-l[#]] [-n # [-x]] [-s size] [cmd [args ...]]
>>> Source unpacked in /opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work
>>> Preparing source in /opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work/perl-5.12.3 ...

...skip...

  /opt/gentoo/usr/share/man/man1/s2p.1
  /opt/gentoo/usr/share/man/man1/psed.1
make[1]: Leaving directory `/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work/perl-5.12.3'
find: bad option -iname
find: [-H | -L] path-list predicate-list
find: bad option -delete
find: [-H | -L] path-list predicate-list
 * ERROR: dev-lang/perl-5.12.3 failed (install phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  62:  Called call-ebuildshell 'src_install'
 *   environment, line 497:  Called src_install
 *   environment, line 2886:  Called die
 * The specific snippet of code: 
 *       find "${ED}" -type f -name .packlist -delete || die;
 *
 * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.3',
 * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.3'.
 * The complete build log is located at '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/temp/build.log'.
 * The ebuild environment file is located at '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/temp/environment'.
 * S: '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work/perl-5.12.3'
 * QA Notice: command not found:
 *
 *     ./hints/solaris_2.sh: line 132: mount: command not found
>>> Failed to emerge dev-lang/perl-5.12.3, Log file:

>>>  '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/temp/build.log'

 * Messages for package dev-lang/perl-5.12.3:

 * ERROR: dev-lang/perl-5.12.3 failed (install phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  62:  Called call-ebuildshell 'src_install'
 *   environment, line 497:  Called src_install
 *   environment, line 2886:  Called die
 * The specific snippet of code: 
 *       find "${ED}" -type f -name .packlist -delete || die;
 *
 * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.3',
 * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.3'.
 * The complete build log is located at '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/temp/build.log'.
 * The ebuild environment file is located at '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/temp/environment'.
 * S: '/opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/work/perl-5.12.3'
$ type find
find is hashed (/opt/gentoo/tmp/usr/bin/find)

Looks like the Solaris find(1) was called instead of the Gentoo one.

The Gentoo one has -iname
Code:
$ find -iname
find: missing argument to `-iname'
Back to top
View user's profile Send private message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Wed Jul 20, 2011 3:25 am    Post subject: Reply with quote

truss (system call tracing) reveals:

Quote:
27631: stat(".", 0xFFFFFD7FFFDEEE20) = 0
27631: stat("/opt/gentoo/usr/lib/portage/bin/ebuild-helpers/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/usr/sbin/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/usr/bin/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/sbin/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/bin/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/opt/bin/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/usr/x86_64-pc-solaris2.10/binutils-bin/2.20.1/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/opt/gentoo/usr/x86_64-pc-solaris2.10/gcc-bin/4.2.4/find", 0xFFFFFD7FFFDEED30) Err#2 ENOENT
27631: stat("/usr/bin/find", 0xFFFFFD7FFFDEED30) = 0


Despite having /opt/gentoo/tmp/usr/bin:/opt/gentoo/tmp/bin in $PATH
Code:
$ env | grep PATH | grep -v MANPATH
PATH=/opt/gentoo/usr/bin:/opt/gentoo/bin:/opt/gentoo/tmp/usr/bin:/opt/gentoo/tmp/bin:/usr/sfw/bin:/usr/sfw/i386-sun-solaris2.10/bin:/usr/bin:/bin


so I cheat:
Code:
cp /opt/gentoo/tmp/usr/bin/xargs /opt/gentoo/usr/bin/
cp /opt/gentoo/tmp/usr/bin/find /opt/gentoo/usr/bin/

Then it installs with only some warnings:
Code:
>>> Completed installing perl-5.12.3 into /opt/gentoo/var/tmp/portage/dev-lang/perl-5.12.3/image/opt/gentoo/

 * QA Notice: command not found:
 *
 *     ./hints/solaris_2.sh: line 132: mount: command not found
ecompressdir: bzip2 -9 /opt/gentoo/usr/share/man

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * pp_sys.c:3073: warning: implicit declaration of function 'eaccess'

 * Please do not file a Gentoo bug and instead report the above QA
 * issues directly to the upstream developers of this software.
 * Homepage: http://www.perl.org/

>>> Installing (1 of 2) dev-lang/perl-5.12.3


Last edited by soltoo on Wed Jul 20, 2011 6:16 pm; edited 3 times in total
Back to top
View user's profile Send private message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Wed Jul 20, 2011 4:50 am    Post subject: Reply with quote

Got circular dependencies between gcc and (lib) mpc

Had to use an older gcc

$ cat /opt/gentoo/etc/portage/package.mask
>=sys-devel/gcc-4.2.4-r01.3

Then I could install the updated system for the first time after the first emerge sync.

To correct for having manually installed find and xargs

env FEATURES="-collision-protect" emerge --oneshot findutils

Then

USE=-git emerge -u system

It really worked! :)

Code:
$ USE=-git emerge --pretend -u system

These are the packages that would be merged, in order:

Calculating dependencies... done!
Back to top
View user's profile Send private message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Thu Jul 21, 2011 6:13 pm    Post subject: Reply with quote

When installing as root "enewgroup man 15" fails because the sys-apps/shadow package is not present in Gentoo Prefix and enewgroup calls the Solaris 10 /usr/sbin/groupadd with unavailable argument "-r"

Code:

>>> Emerging (1 of 1) sys-apps/man-1.6g
 * man-1.6g.tar.gz RMD160 SHA1 SHA256 size ;-) ...   [ ok ]
 * Adding group 'man' to your system ...
 *  - Groupid: 15
groupadd: illegal option -- r
UX: groupadd: ERROR: invalid syntax.
usage: groupadd [-g gid [-o]] group
 * ERROR: sys-apps/man-1.6g failed (setup phase):

I'm not quite sure what would be the best thing to fix to get this to work.

I'm leaning toward creating a non-root account just for Gentoo Prefix and using that to install.

My workflow is colored by needing to bring up OpsCode Chef. To deploy we make a bare (new) Solaris zone and then bring up Chef and that configures our environment.

We have been trying to do this on OpenCSW but the "stable" version is way too out-of-date and the "current" version is very unstable and our "stack" to support Rubygems keeps being broken. This is why I'm evaluating using Gentoo Prefix as a replacement.
Back to top
View user's profile Send private message
soltoo
n00b
n00b


Joined: 02 Jul 2011
Posts: 15

PostPosted: Mon Jul 25, 2011 7:35 pm    Post subject: Reply with quote

Code:
soltoo@globalzone:~$ pfexec zlogin containerzone
[Connected to zone 'containerzone' pts/15]
Last login: Mon Jul 25 15:21:00 on pts/15
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
# /opt/gentoo/runprefix chef-client
Entering Gentoo Prefix /opt/gentoo
INFO: Starting Chef Run (Version XXXX)
INFO: Writing updated content for template[heartbeat notifier] to /srv/chef/local/heartbeat_notifier
INFO: template[heartbeat notifier] sending create action to template[heartbeat] (delayed)
INFO: Writing updated content for template[heartbeat] to /srv/chef/local/heartbeat
INFO: Chef Run complete in 53.991929 seconds
INFO: cleaning the checksum cache
INFO: Running report handlers
INFO: Report handlers complete
Leaving Gentoo Prefix with exit status 0
#
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum