On Tue, Jan 29, 2013 at 08:20:42AM -0700, Alexander Hansen wrote:
> On 1/29/13 7:49 AM, Jack Howarth wrote:
> > Using a clean bootstrap of fink fink-0.34.5 on Mac OS X 10.8 with Xcode
> > 4.6 and
> > its associated Command Line Tools installed, I am seeing a failure in the
> > build of
> > db51-aes-5.1.29-2 at...
> >
> > clang -c -I. -I../src -Os ../src/btree/bt_compare.c -fno-common -DPIC -o
> > .libs/bt_compare.o
> > In file included from ../src/btree/bt_compare.c:46:
> > In file included from ./db_int.h:999:
> > In file included from ../src/dbinc/mutex.h:15:
> > In file included from ../src/dbinc/mutex_int.h:12:
> > ../src/dbinc/atomic.h:179:19: error: definition of builtin function
> > '__atomic_compare_exchange'
> > static inline int __atomic_compare_exchange(
> > ^
> > 1 error generated.
> >
> > This looks like the issue discussed in...
> >
> > http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-April/020973.html
> > http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-April/020974.html
> >
> > Jack
> >
>
> Since this is a maintained package, I'll cc the maintainer.
The attached patch derived from
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2012-05/msg00058.html
solves the build problem on Clang 4.2.
Jack
ps The net change to the info file is...
--- db51-aes.info 2012-01-17 12:19:49.000000000 -0500
+++ /sw/fink/10.7/local/main/finkinfo/db51-aes.info 2013-01-29
11:06:57.000000000 -0500
@@ -1,7 +1,7 @@
Info4: <<
Package: db51-aes%type_pkg[-64bit]
Version: 5.1.29
-Revision: 2
+Revision: 3
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] =
-64bit ) i386
CustomMirror: <<
@@ -161,6 +161,8 @@
Homepage: http://www.oracle.com/database/berkeley-db/index.html
Maintainer: Daniel Johnson <dan...@daniel-johnson.org>
Source-MD5: a94ea755ab695bc04f82b94d2e24a1ef
+PatchFile: %n.patch
+PatchFile-MD5: 1ed24665950881ecab778163aa986fa1
InfoTest: TestScript: cd test/micro; sh test_micro || exit 2
<<
> --
> Alexander Hansen, Ph.D.
> Fink User Liaison
> My package updates: http://finkakh.wordpress.com/
--- db-5.1.29/src/dbinc/atomic.h.orig 2013-01-29 11:05:16.000000000 -0500
+++ db-5.1.29/src/dbinc/atomic.h 2013-01-29 11:05:32.000000000 -0500
@@ -144,7 +144,7 @@
#define atomic_inc(env, p) __atomic_inc(p)
#define atomic_dec(env, p) __atomic_dec(p)
#define atomic_compare_exchange(env, p, o, n) \
- __atomic_compare_exchange((p), (o), (n))
+ __atomic_compare_exchange_db((p), (o), (n))
static inline int __atomic_inc(db_atomic_t *p)
{
int temp;
@@ -176,7 +176,7 @@
* http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
* which configure could be changed to use.
*/
-static inline int __atomic_compare_exchange(
+static inline int __atomic_compare_exchange_db(
db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
{
atomic_value_t was;
Info4: <<
Package: db51-aes%type_pkg[-64bit]
Version: 5.1.29
Revision: 3
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] =
-64bit ) i386
CustomMirror: <<
nam-US: http://download-east.oracle.com/berkeley-db/
nam-US: http://download-west.oracle.com/berkeley-db/
eur-UK: http://download-uk.oracle.com/berkeley-db/
<<
Source: mirror:custom:db-%v.tar.gz
Replaces: <<
db, db3, db31 (<< 3.1.17-8),
db4-ssl, db4,
db41-ssl, db41,
db42-ssl, db42,
db43-ssl, db43,
db44-aes, db44,
db47-aes, db47, db47-aes-64bit, db47-64bit,
db48-aes, db48, db48-aes-64bit, db48-64bit,
db50-aes, db50, db50-aes-64bit, db50-64bit,
db51-aes, db51, db51-aes-64bit, db51-64bit,
db53-aes, db53-aes-64bit
<<
Conflicts: <<
db, db3, db31 (<< 3.1.17-8),
db4-ssl, db4,
db41-ssl, db41,
db42-ssl, db42,
db43-ssl, db43,
db44-aes, db44,
db47-aes, db47, db47-aes-64bit, db47-64bit,
db48-aes, db48, db48-aes-64bit, db48-64bit,
db50-aes, db50, db50-aes-64bit, db50-64bit,
db51-aes, db51, db51-aes-64bit, db51-64bit,
db53-aes, db53-aes-64bit
<<
Depends: db51%type_pkg[-64bit]-shlibs (= %v-%r) |
db51-aes%type_pkg[-64bit]-shlibs (=%v-%r), ( %type_raw[-64bit] = -64bit )
64bit-cpu
BuildDepends: fink (>= 0.26.2)
BuildDependsOnly: true
NoSetLDFlags: true
NoSetCPPFlags: true
SetCFlags: -Os
SetCXXFlags: -Os
UseMaxBuildJobs: true
ConfigureParams: --enable-compat185 --enable-cxx --enable-dump185
--includedir=%p/include/db4 --libdir='${prefix}/%lib' --disable-static
--enable-stl --enable-sql --enable-sql_codegen
GCC: 4.0
CompileScript: <<
#! /bin/sh -ex
set +x
if [ -e /usr/local/include/db.h ]; then
echo "-----WARNING-----WARNING-----WARNING-----"
echo "You seem to have a Berkeley DB installation in /usr/local."
echo "This is known to cause %N to fail to build."
echo "Please rename /usr/local/include/db.h temporarily and try again."
echo "-----WARNING-----WARNING-----WARNING-----"
exit 1
fi
set -x
VERSIONS="-avoid-version -XCClinker -current_version -XCClinker %v -XCClinker
-compatibility_version -XCClinker 5.1 -no-undefined"
LIBDB="libdb-5.1.la"
LIBDBCXX="libdb_cxx-5.1.la"
LIBDBSTL="libdb_stl-5.1.la"
LIBDBSQL="libdb_sql-5.1.la"
cd build_unix;
if [ "%type_raw[-64bit]" == "-64bit" ]; then
export CC="gcc -m64"
export CXX="g++ -m64"
else
export CC="gcc"
export CXX="g++"
fi
# On 10.4, libSystem does not contain _gethostuuid :
if [ `sw_vers -productVersion|cut -f2 -d.` -lt 5 ] ; then export
CFLAGS="-DSQLITE_ENABLE_LOCKING_STYLE=0 $CFLAGS" ; fi
F77=no ../dist/configure %c
perl -pi.bak -e 's,api_java,,g' Makefile
make UTIL_PROGS=""
rm ".libs/$LIBDB" $LIBDB
make SOLINK="\$(LIBTOOL) --mode=link --tag=CC $CC $VERSIONS" UTIL_PROGS=""
rm ".libs/$LIBDBCXX" $LIBDBCXX
make XSOLINK="\$(LIBTOOL) --mode=link --tag=CXX $CXX $VERSIONS" UTIL_PROGS=""
rm ".libs/$LIBDBSTL" $LIBDBSTL
make XSOLINK="\$(LIBTOOL) --mode=link --tag=CXX $CXX $VERSIONS" UTIL_PROGS=""
rm ".libs/$LIBDBSQL" $LIBDBSQL
make SOLINK="\$(LIBTOOL) --mode=link --tag=CC $CC $VERSIONS" UTIL_PROGS=""
make
<<
InstallScript: <<
#! /bin/sh -ev
(cd build_unix; make install prefix=%I docdir=%I/share/doc/db51-doc/docs
includedir=%I/include/db4 libdir=%I/%lib) || exit 1
binfiles="db_archive db_checkpoint dbsql db_deadlock db_dump db_dump185
db_hotbackup db_load db_printlog db_recover db_stat db_upgrade db_verify"
for binfile in $binfiles ; do
mv %i/bin/$binfile %i/bin/$binfile.%N
done
mkdir -p %I/include/db5
cp %I/include/db4/* %I/include/db5
<<
# I was an idiot. Clean up my mess.
PreInstScript: rm -rf %p/include/db4
SplitOff: <<
Package: %N-shlibs
Depends: ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Replaces: <<
( %type_raw[-64bit] = . ) db51-aes-shlibs,
( %type_raw[-64bit] = . ) db51-shlibs,
( %type_raw[-64bit] = -64bit ) db51-aes-64bit-shlibs,
( %type_raw[-64bit] = -64bit ) db51-64bit-shlibs
<<
Conflicts: <<
( %type_raw[-64bit] = . ) db51-aes-shlibs,
( %type_raw[-64bit] = . ) db51-shlibs,
( %type_raw[-64bit] = -64bit ) db51-aes-64bit-shlibs,
( %type_raw[-64bit] = -64bit ) db51-64bit-shlibs
<<
Description: Shared Libraries for %N
Files: %lib/libdb-5.1.dylib %lib/libdb_cxx-5.1.dylib %lib/libdb_stl-5.1.dylib
%lib/libdb_sql-5.1.dylib %lib/libdb-5.1.la %lib/libdb_cxx-5.1.la
%lib/libdb_stl-5.1.la %lib/libdb_sql-5.1.la
Shlibs: <<
%p/%lib/libdb-5.1.dylib 5.1.0 %n (>= 5.1.19-1) %type_num[-64bit]
%p/%lib/libdb_cxx-5.1.dylib 5.1.0 %n (>= 5.1.19-1) %type_num[-64bit]
%p/%lib/libdb_stl-5.1.dylib 5.1.0 %n (>= 5.1.19-1) %type_num[-64bit]
%p/%lib/libdb_sql-5.1.dylib 5.1.0 %n (>= 5.1.19-1) %type_num[-64bit]
<<
DocFiles: LICENSE
<<
SplitOff2: <<
Package: %N-bin
Depends: %N-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Conflicts: db3-bin (<< 3.3.11-25), db31 (<< 3.1.17-2), db4-ssl-bin (<<
4.0.14-24), db4-bin (<< 4.0.14-24), db41-ssl-bin (<< 4.1.25-20), db42-ssl-bin
(<< 4.2.52-14), db41-bin (<< 4.1.25-20), db42-bin (<< 4.2.52-14), db43-ssl-bin
Replaces: db3-bin, db4 (<< 4.0.14-4), db31 (<< 3.1.17-2), db4-ssl-bin (<<
4.0.14-24), db4-bin (<< 4.0.14-24), db41-ssl-bin (<< 4.1.25-20), db42-ssl-bin
(<< 4.2.52-14), db41-bin (<< 4.1.25-20), db42-bin (<< 4.2.52-14), db43-ssl-bin
Description: Binary utilities for %N
Files: bin
DocFiles: LICENSE
PostInstScript: <<
binfiles="db_archive db_checkpoint dbsql db_deadlock db_dump db_dump185
db_hotbackup db_load db_printlog db_recover db_stat db_upgrade db_verify"
priority=`echo %N | sed -e 's/[^0-9]//g'`
for binfile in $binfiles ; do
update-alternatives --install %p/bin/$binfile $binfile
%p/bin/$binfile.%N $priority
done
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
binfiles="db_archive db_checkpoint dbsql db_deadlock db_dump db_dump185
db_hotbackup db_load db_printlog db_recover db_stat db_upgrade db_verify"
for binfile in $binfiles ; do
update-alternatives --remove $binfile %p/bin/$binfile.%N
done
fi
<<
<<
SplitOff3: <<
Package: %N-doc
Conflicts: db51-aes-doc, db51-doc, db51-aes-64bit-doc, db51-64bit-doc
Replaces: db51-aes-doc, db51-doc, db51-aes-64bit-doc, db51-64bit-doc
Description: Documentation for %N
Files: share/doc/db51-doc
DocFiles: LICENSE
<<
DocFiles: LICENSE README
License: OSI-Approved
Description: Berkeley DB embedded database - crypto
Homepage: http://www.oracle.com/database/berkeley-db/index.html
Maintainer: Daniel Johnson <dan...@daniel-johnson.org>
Source-MD5: a94ea755ab695bc04f82b94d2e24a1ef
PatchFile: %n.patch
PatchFile-MD5: 1ed24665950881ecab778163aa986fa1
InfoTest: TestScript: cd test/micro; sh test_micro || exit 2
<<
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel