NetBSD Problem Report #45102

From www@NetBSD.org  Mon Jun 27 16:34:41 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 541D963C4C9
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Jun 2011 16:34:41 +0000 (UTC)
Message-Id: <20110627163439.9F4D163B970@www.NetBSD.org>
Date: Mon, 27 Jun 2011 16:34:39 +0000 (UTC)
From: KOT@MATPOCKuH.Ru
Reply-To: KOT@MATPOCKuH.Ru
To: gnats-bugs@NetBSD.org
Subject: databases/db4 fails to build on Solaris10 with gcc in 64bit mode
X-Send-Pr-Version: www-1.0

>Number:         45102
>Category:       pkg
>Synopsis:       databases/db4 fails to build on Solaris10 with gcc in 64bit mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 27 16:35:00 +0000 2011
>Last-Modified:  Wed Jul 20 13:15:02 +0000 2011
>Originator:     Dmitry Afanasiev
>Release:        
>Organization:
>Environment:
SunOS sunray 5.10 Generic_144489-01 i86pc i386 i86pc

>Description:
databases/db4 fails to build on Solaris 10 after these messages:

libtool: link: g++ -shared -nostdlib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib /usr/lib/crti.o /usr/lib/values-Xa.o /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/crtbegin.o  .libs/cxx_db.o .libs/cxx_dbc.o .libs/cxx_dbt.o .libs/cxx_env.o .libs/cxx_except.o .libs/cxx_lock.o .libs/cxx_logc.o .libs/cxx_mpool.o .libs/cxx_multi.o .libs/cxx_seq.o .libs/cxx_txn.o .libs/db185.o .libs/mut_tas.o .libs/mut_pthread.o .libs/bt_compare.o .libs/bt_compress.o .libs/bt_conv.o .libs/bt_curadj.o .libs/bt_cursor.o .libs/bt_delete.o .libs/bt_method.o .libs/bt_open.o .libs/bt_put.o .libs/bt_rec.o .libs/bt_reclaim.o .libs/bt_recno.o .libs/bt_rsearch.o .libs/bt_search.o .libs/bt_split.o .libs/bt_stat.o .libs/bt_compact.o .libs/bt_upgrade.o .libs/btree_auto.o .libs/hash.o .libs/hash_auto.o .libs/hash_conv.o .libs/hash_dup.o .libs/hash_meta.o .libs/hash_method.o .libs/hash_open.o .libs/hash_page.o .libs/hash_rec.o .libs/hash_reclaim.o .libs/hash_stat.o .libs/hash_upgrade.o .libs/hash_verify.o .libs/qam
 .o .libs/qam_auto.o .libs/qam_conv.o .libs/qam_files.o .libs/qam_method.o .libs/qam_open.o .libs/qam_rec.o .libs/qam_stat.o .libs/qam_upgrade.o .libs/qam_verify.o .libs/rep_auto.o .libs/rep_backup.o .libs/rep_elect.o .libs/rep_lease.o .libs/rep_log.o .libs/rep_method.o .libs/rep_record.o .libs/rep_region.o .libs/rep_stat.o .libs/rep_util.o .libs/rep_verify.o .libs/os_addrinfo.o .libs/repmgr_auto.o .libs/repmgr_elect.o .libs/repmgr_method.o .libs/repmgr_msg.o .libs/repmgr_net.o .libs/repmgr_posix.o .libs/repmgr_queue.o .libs/repmgr_sel.o .libs/repmgr_stat.o .libs/repmgr_util.o .libs/db_ovfl_vrfy.o .libs/db_vrfy.o .libs/db_vrfyutil.o .libs/bt_verify.o .libs/lock.o .libs/lock_deadlock.o .libs/lock_failchk.o .libs/lock_id.o .libs/lock_list.o .libs/lock_method.o .libs/lock_region.o .libs/lock_stat.o .libs/lock_timer.o .libs/lock_util.o .libs/mut_alloc.o .libs/mut_failchk.o .libs/mut_method.o .libs/mut_region.o .libs/mut_stat.o .libs/strsep.o .libs/aes_method.o .libs/crypto.o .lib
 s/mt19937db.o .libs/rijndael-alg-fst.o .libs/rijndael-api-fst.o .libs/crdel_auto.o .libs/crdel_rec.o .libs/db.o .libs/db_am.o .libs/db_auto.o .libs/db_byteorder.o .libs/db_cam.o .libs/db_cds.o .libs/db_compint.o .libs/db_conv.o .libs/db_dispatch.o .libs/db_dup.o .libs/db_err.o .libs/db_getlong.o .libs/db_idspace.o .libs/db_iface.o .libs/db_join.o .libs/db_log2.o .libs/db_meta.o .libs/db_method.o .libs/db_open.o .libs/db_overflow.o .libs/db_pr.o .libs/db_rec.o .libs/db_reclaim.o .libs/db_remove.o .libs/db_rename.o .libs/db_ret.o .libs/db_setid.o .libs/db_setlsn.o .libs/db_shash.o .libs/db_sort_multiple.o .libs/db_stati.o .libs/db_truncate.o .libs/db_upg.o .libs/db_upg_opd.o .libs/dbm.o .libs/dbreg.o .libs/dbreg_auto.o .libs/dbreg_rec.o .libs/dbreg_stat.o .libs/dbreg_util.o .libs/dbt.o .libs/env_alloc.o .libs/env_config.o .libs/env_failchk.o .libs/env_file.o .libs/env_globals.o .libs/env_method.o .libs/env_name.o .libs/env_open.o .libs/env_recover.o .libs/env_region.o .libs/en
 v_register.o .libs/env_sig.o .libs/env_stat.o .libs/fileops_auto.o .libs/fop_basic.o .libs/fop_rec.o .libs/fop_util.o .libs/hash_func.o .libs/hmac.o .libs/hsearch.o .libs/log.o .libs/log_archive.o .libs/log_compare.o .libs/log_debug.o .libs/log_get.o .libs/log_method.o .libs/log_put.o .libs/log_stat.o .libs/mkpath.o .libs/mp_alloc.o .libs/mp_bh.o .libs/mp_fget.o .libs/mp_fmethod.o .libs/mp_fopen.o .libs/mp_fput.o .libs/mp_fset.o .libs/mp_method.o .libs/mp_mvcc.o .libs/mp_region.o .libs/mp_register.o .libs/mp_resize.o .libs/mp_stat.o .libs/mp_sync.o .libs/mp_trickle.o .libs/openflags.o .libs/os_abort.o .libs/os_abs.o .libs/os_alloc.o .libs/os_clock.o .libs/os_cpu.o .libs/os_ctime.o .libs/os_config.o .libs/os_dir.o .libs/os_errno.o .libs/os_fid.o .libs/os_flock.o .libs/os_fsync.o .libs/os_getenv.o .libs/os_handle.o .libs/os_map.o .libs/os_method.o .libs/os_mkdir.o .libs/os_open.o .libs/os_pid.o .libs/os_rename.o .libs/os_root.o .libs/os_rpath.o .libs/os_rw.o .libs/os_seek.o .l
 ibs/os_stack.o .libs/os_stat.o .libs/os_tmpdir.o .libs/os_truncate.o .libs/os_uid.o .libs/os_unlink.o .libs/os_yield.o .libs/partition.o .libs/seq_stat.o .libs/sequence.o .libs/sha1.o .libs/snprintf.o .libs/txn.o .libs/txn_auto.o .libs/txn_chkpt.o .libs/txn_failchk.o .libs/txn_method.o .libs/txn_rec.o .libs/txn_recover.o .libs/txn_region.o .libs/txn_stat.o .libs/txn_util.o .libs/zerofill.o   -Wl,-R -Wl,/usr/sfw/lib -Wl,-R -Wl,/usr/sfw/lib -lresolv -lrt -lpthread -lnsl -lsocket -L/root/pkgsrc/databases/db4/work/.buildlink/lib -L/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -L/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../.. /usr/sfw/lib/libstdc++.so -L/usr/sfw/lib -lm -lgcc_s /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/crtend.o /usr/lib/crtn.o  -Wl,-R/usr/pkg/lib   -Wl,-h -Wl,libdb4_cxx-4.8.so -o .libs/libdb4_cxx-4.8.so
ld: fatal: file .libs/cxx_db.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to .libs/libdb4_cxx-4.8.so
collect2: ld returned 1 exit status
*** Error code 1

Stop.
bmake: stopped in /root/pkgsrc/databases/db4/work/db-4.8.30/build_unix
*** Error code 1

Stop.
bmake: stopped in /root/pkgsrc/databases/db4
*** Error code 1

Stop.
bmake: stopped in /root/pkgsrc/databases/db4

It uses theses files with path:
/usr/lib/crti.o
/usr/lib/values-Xa.o
/usr/lib/crtn.o
/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/crtbegin.o
/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/crtend.o

But must be used this paths:
/usr/lib/amd64 /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/amd64

After manual editing of work/.wrapper/tmp/cache-body and work/.wrapper/tmp/cache build was successful.
>How-To-Repeat:
On Solaris10/amd64:
# ./bootstrap --abi=64
# cd ../databases/db4
# bmake
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Wed, 20 Jul 2011 12:49:43 +0000
Responsible-Changed-Why:
Problem on Solaris.


From: Tim Zingelman <zingelman@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45102 (databases/db4 fails to build on Solaris10 with gcc in
 64bit mode)
Date: Wed, 20 Jul 2011 08:11:07 -0500

 See this email thread for some ideas:

  http://mail-index.netbsd.org/pkgsrc-users/2011/02/14/msg013744.html

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.