Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209154 - sys-libs/db-4.5.20_p2 fails for systems which don't need ranlib
Summary: sys-libs/db-4.5.20_p2 fails for systems which don't need ranlib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on: 223351
Blocks: 210151
  Show dependency tree
 
Reported: 2008-02-06 15:21 UTC by Stuart Shelton
Modified: 2009-10-09 13:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2008-02-06 15:21:55 UTC
The db build fails with:

ar cru .libs/libdb-4.5.a  db185.o mut_pthread.o bt_compare.o bt_conv.o bt_curadj.o bt_cursor.o bt_delete.o bt_method.o bt_open.o bt_put.o bt_rec.o bt_reclaim.o bt_recno.o bt_rsearch.o bt_search.o bt_split.o bt_stat.o bt_compact.o bt_upgrade.o btree_auto.o hash.o hash_auto.o hash_conv.o hash_dup.o hash_meta.o hash_method.o hash_open.o hash_page.o hash_rec.o hash_reclaim.o hash_stat.o hash_upgrade.o hash_verify.o qam.o qam_auto.o qam_conv.o qam_files.o qam_method.o qam_open.o qam_rec.o qam_stat.o qam_upgrade.o qam_verify.o rep_auto.o rep_backup.o rep_elect.o rep_log.o rep_method.o rep_record.o rep_region.o rep_stat.o rep_util.o rep_verify.o getaddrinfo.o repmgr_elect.o repmgr_method.o repmgr_msg.o repmgr_net.o repmgr_posix.o repmgr_queue.o repmgr_sel.o repmgr_stat.o repmgr_util.o db_ovfl_vrfy.o db_vrfy.o db_vrfyutil.o bt_verify.o strsep.o aes_method.o crypto.o mt19937db.o rijndael-alg-fst.o rijndael-api-fst.o client.o db_server_clnt.o db_server_xdr.o gen_client.o gen_client_ret.o crdel_auto.o crdel_rec.o ctime.o db.o db_am.o db_auto.o db_byteorder.o db_cam.o db_cds.o db_clock.o db_conv.o db_dispatch.o db_dup.o db_err.o db_getlong.o db_idspace.o db_iface.o db_join.o db_log2.o db_meta.o db_method.o db_open.o db_overflow.o db_pr.o db_rec.o db_reclaim.o db_remove.o db_rename.o db_ret.o db_salloc.o db_setid.o db_setlsn.o db_shash.o db_stati.o db_truncate.o db_upg.o db_upg_opd.o dbm.o dbreg.o dbreg_auto.o dbreg_rec.o dbreg_stat.o dbreg_util.o env_config.o env_failchk.o env_file.o env_method.o env_open.o env_recover.o env_region.o env_register.o env_stat.o fileops_auto.o fop_basic.o fop_rec.o fop_util.o hash_func.o hmac.o hsearch.o lock.o lock_deadlock.o lock_failchk.o lock_id.o lock_list.o lock_method.o lock_region.o lock_stat.o lock_timer.o lock_util.o log.o log_archive.o log_compare.o log_debug.o log_get.o log_method.o log_put.o log_stat.o mkpath.o mp_alloc.o mp_bh.o mp_fget.o mp_fmethod.o mp_fopen.o mp_fput.o mp_fset.o mp_method.o mp_mvcc.o mp_region.o mp_register.o mp_stat.o mp_sync.o mp_trickle.o mut_alloc.o mut_failchk.o mut_method.o mut_region.o mut_stat.o os_abs.o os_alloc.o os_clock.o os_config.o os_dir.o os_errno.o os_fid.o os_flock.o os_fsync.o os_fzero.o os_getenv.o os_handle.o os_map.o os_method.o os_mkdir.o os_oflags.o os_open.o os_pid.o os_region.o os_rename.o os_root.o os_rpath.o os_rw.o os_seek.o os_sleep.o os_spin.o os_stat.o os_tmpdir.o os_truncate.o os_uid.o os_unlink.o os_yield.o seq_stat.o sequence.o sha1.o snprintf.o txn.o txn_auto.o txn_chkpt.o txn_failchk.o txn_method.o txn_rec.o txn_recover.o txn_region.o txn_stat.o txn_util.o xa.o xa_db.o xa_map.o
none .libs/libdb-4.5.a
./libtool: line 5903: none: command not found
make: *** [libdb-4.5.la] Error 127
 * 
 * ERROR: sys-libs/db-4.5.20_p2 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 4462:  Called die
 * The specific snippet of code:
 *       emake -j1 || diefunc "$FUNCNAME" "$LINENO" "$?" "make failed"
 *  The die message:
 *   make failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/usr/opt/portage/var/tmp/portage/sys-libs/db-4.5.20_p2/temp/build.log'.
 * The ebuild environment file is located at '/usr/opt/portage/var/tmp/portage/sys-libs/db-4.5.20_p2/temp/environment'.
 * 

The Makefile seems to check for RANLIB or STRIP being "none", so the problem does seem to be in libtool (as indicated).

Patching build_unix/libtool from 'RANLIB="none"' to 'RANLIB=":"' in the ebuild worked for me...
Comment 1 Fabian Groffen gentoo-dev 2008-02-11 10:39:44 UTC
could you please look at sys-devel/native-cctools and see what you need there to make it "work"?  I guess it's trivial there to make a ranlib script for IRIX that simply is a noop such that we don't have to fix this package, but just work around it in a generic way.
Comment 2 Stuart Shelton 2008-02-14 16:50:27 UTC
IRIX has no native 'addr2line', 'c++filt', 'gprof', 'objcopy', 'objdump', 'ranlib', or 'readelf', but the remainder of the tools are (symlinked) into /usr/bin/

(... and actually, all of these symlinks are targetted at "../lib/driverwrap", which is a binary with no manpage or help function)

/opt/MIPSpro/bin contains:

lrwxr-xr-x 1 root sys    6 2007-10-09 20:53 CC -> driver*
lrwxr-xr-x 1 root sys    6 2007-10-09 20:53 as -> driver*
lrwxr-xr-x 1 root sys    6 2007-10-09 20:53 cc -> driver*
-rwxr-xr-x 1 root sys 4.3K 2007-10-10 01:22 driver*
lrwxr-xr-x 1 root sys    6 2007-10-09 20:53 f77 -> driver*
lrwxr-xr-x 1 root sys    6 2007-10-09 20:53 f90 -> driver*
lrwxr-xr-x 1 root sys    6 2007-10-09 20:53 ld -> driver*

/usr/bin also has:

lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 CC -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 OCC -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 ar -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 as -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 c89 -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 c99 -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 cc -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 dis -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 elfdump -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 f77 -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 f90 -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 fort77 -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 ld -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 nm -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 size -> ../lib/driverwrap*
lrwxr-xr-x 1 root sys    17 2007-10-09 20:53 strip -> ../lib/driverwrap*
Comment 3 Stuart Shelton 2008-05-17 16:53:26 UTC
Note that even with a (noop) 'ranlib' binary in the default $PATH, this build still fails.

(There seems to be logic within db's libtool which correctly realises that IRIX doesn't need ranlib, but then sets $RANLIB to 'none' which it later tries to execute)

I notice that the ebuild now includes a patch to fix up an AIX problem with libtool - can this IRIX problem be addressed in the same way?
Comment 4 Fabian Groffen gentoo-dev 2008-05-17 17:34:40 UTC
libtool.m4 does this:

AC_CHECK_TOOL(RANLIB, ranlib, :)

test -z "$RANLIB" && RANLIB=:

Isn't this just magically solved by using a recent version of libtool.m4 then?  (what the AIX stuff does)
Comment 5 Stuart Shelton 2008-05-19 14:45:43 UTC
I'm not sure how the m4 macros work - and it's possible that the fact that I've created a 'ranlib' symlink (which is actually a no-op) might be throwing it off...

... but it's *still* trying to execute 'none' in db-4.6 too :(

I've fixed it for now by creating a 'none' symlink alongside the ranlib one - but this is a nasty hack of a solution :(

Would simply grepping the build files for 'none' and removing all instances be the simplest fix?
Comment 6 Fabian Groffen gentoo-dev 2008-05-20 12:27:22 UTC
does it look a bit like this?

cp -p .libs/db_load /export/gentoo/binbuilds/default-prefix/sunos/solaris/5.10/x64/GentooPrefixSolaris10x64/var/tmp/portage/sys-libs/db-4.6.21/image/export/gentoo/binbuilds/default-prefix/sunos/solaris/5.10/x64/GentooPrefixSolaris10x64/usr/bin/db_load
/export/gentoo/binbuilds/default-prefix/sunos/solaris/5.10/x64/GentooPrefixSolaris10x64/bin/sh: line 4: none: command not found
libtool: install: warning: `libdb-4.6.la' has not been installed in `/export/gentoo/binbuilds/default-prefix/sunos/solaris/5.10/x64/GentooPrefixSolaris10x64/usr/lib'

(judging from the first post I guess not, but this is just what I see on x64-solaris)
Comment 7 Stuart Shelton 2008-05-20 23:21:51 UTC
Afraid not - even in db-4.6, the output is virtually identical to that in the original post.
Plus, the build stops at that point: there's no warning on libraries not being installed (and, if RANLIB is forced to ':' or a 'none' command exists, then the package tests and installs successfully)
Comment 8 Fabian Groffen gentoo-dev 2008-08-16 09:36:20 UTC
the ebuild formerly set STRIP to none, now it sets STRIP to true, could this be of any influence.  4.7 has STRIP set to true now.
Comment 9 Stuart Shelton 2008-08-19 18:01:02 UTC
The new versions of db-4.5 and db-4.6 both built and installed (and I believe tested - although I can't remember whether FEATURES="test") successfully with no further modification.

This is, however, with the IRIX-MIPSpro-wrapper script in place to provide a no-op "ranlib" command - I haven't tried a build without this in place.

I didn't have a problem with "strip", though ;)
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-09-09 05:45:11 UTC
I'm pretty sure that my last commit to sys-libs/db, if not one of the earlier ones should have fixed this for absolutely all systems, including the alt ones. 
They'll need to copy it over to their prefix tree probably, but it should work, just needs to be tested.
Comment 11 Fabian Groffen gentoo-dev 2008-09-09 07:48:36 UTC
% eupdate
 * Processing sys-libs/db
 * checking ChangeLog ...                                                 [ ok ]
 * checking db-1.85-r3.ebuild ...                                         [ ok ]
 * checking db-3.2.9_p2.ebuild ...                                        [ ok ]
 * checking db-4.2.52_p5-r1.ebuild ...                                    [ ok ]
 * checking db-4.3.29_p1-r1.ebuild ...                                    [ ok ]
 * checking db-4.4.20_p4-r1.ebuild ...                                    [ ok ]
 * checking db-4.5.20_p2-r1.ebuild ...                                    [ ok ]
 * checking db-4.6.21_p3-r1.ebuild ...                                    [ ok ]
 * checking db-4.7.25_p1-r1.ebuild ...                                    [ ok ]
 * checking files/ (a directory)
 *   checking db-1.85-gentoo-paths.patch ...                              [ ok ]
 *   checking db-3.2.9-fix-dep-link.patch ...                             [ ok ]
 *   checking db-3.2.9-gcc43.patch ...                                    [ ok ]
 *   checking db-4.0.14-fix-dep-link.patch ...                            [ ok ]
 *   checking db-4.2-jni-check-prefix-first.patch ...                     [ ok ]
 *   checking db-4.2-libtool.patch ...                                    [ ok ]
 *   checking db-4.2-listen-to-java-options.patch ...                     [ ok ]
 *   checking db-4.2.52_p2-TXN.patch ...                                  [ ok ]
 *   checking db-4.3-jarlocation.patch ...                                [ ok ]
 *   checking db-4.3-jni-check-prefix-first.patch ...                     [ ok ]
 *   checking db-4.3-libtool.patch ...                                    [ ok ]
 *   checking db-4.3-listen-to-java-options.patch ...                     [ ok ]
 *   checking db-4.3.27-fix-dep-link.patch ...                            [ ok ]
 *   checking db-4.4-libtool.patch ...                                    [ ok ]
 *   checking db-4.5-libtool.patch ...                                    [ ok ]
 *   checking db-4.5-rpcgen.patch ...                                     [ ok ]
 *   db-4.5-rpcgen.patch: db-4.5-rpcgen.patch not found in the main tree
 *   checking db-4.5-winnt.patch ...                                      [ ok ]
 *   db-4.5-winnt.patch: db-4.5-winnt.patch not found in the main tree
 *   checking db-4.6-interix.patch ...                                    [ ok ]
 *   db-4.6-interix.patch: db-4.6-interix.patch not found in the main tree
 *   checking db-4.6-jni-check-prefix-first.patch ...                     [ ok ]
 *   checking db-4.6-libtool.patch ...                                    [ ok ]
 *   checking db-4.6-winnt.patch ...                                      [ ok ]
 *   db-4.6-winnt.patch: db-4.6-winnt.patch not found in the main tree
 *   checking patch.3.2.9.1 ...                                           [ ok ]
 *   checking patch.3.2.9.2 ...                                           [ ok ]
 * checking metadata.xml ...                                              [ ok ]

We are already "in sync", and your fix doesn't help, as it isn't STRIP which seems to be the problem, but RANLIB.  The bug is open because I still haven't added the mipspro wrapper to Prefix, which would add a dummy ranlib.
Comment 12 Stuart Shelton 2009-07-08 11:28:48 UTC
sys-libs/db-4.7.25_p4 compiles successfully with IRIX-MIPSpro-wrapper.

The wrapper has been stable for a number of weeks now (and only required minor - usually package-specific - tweaks even before that)... I'll attach a tarball of the wrapper itself and the necessary symlinks to a new bug.
Comment 13 Fabian Groffen gentoo-dev 2009-10-03 13:38:34 UTC
please do file a bug with the mipspro wrapper
Comment 14 Stuart Shelton 2009-10-09 13:29:18 UTC
MIPSpro wrapper is now Bug 223351.