Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#15661 closed defect (fixed)

sqlite3 +universal build failure on Tiger

Reported by: ryandesign (Ryan Schmidt) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port: sqlite3

Description

When I try to install sqlite3 +universal on MacPorts 1.6.0 I get this:

$ sudo port install sqlite3 +universal
--->  Fetching sqlite3
--->  Verifying checksum(s) for sqlite3
--->  Extracting sqlite3
--->  Configuring sqlite3
--->  Building sqlite3 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_databases_sqlite3/work/sqlite-3.5.9" && gnumake -j2 all " returned error 2
Command output: sed -e s/--VERS--/3.5.9/ ./src/sqlite.h.in | \
sed -e s/--VERSION-NUMBER--/3005009/ >sqlite3.h
/usr/bin/gcc-4.0 -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -o mkkeywordhash  ./tool/mkkeywordhash.c
/usr/bin/gcc-4.0 -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -o lemon ./tool/lemon.c
./mkkeywordhash >keywordhash.h
cp ./tool/lempar.c .
cp ./src/parse.y .
./lemon  parse.y
mv parse.h parse.h.temp
/opt/local/bin/gawk -f ./addopcodes.awk parse.h.temp >parse.h
cat parse.h ./src/vdbe.c | /opt/local/bin/gawk -f ./mkopcodeh.awk >opcodes.h
sort -n -b -k 3 opcodes.h | /opt/local/bin/gawk -f ./mkopcodec.awk >opcodes.c
rm -rf tsrc
mkdir -p tsrc
cp ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c ./src/bitvec.c ./src/btmutex.c ./src/btree.c ./src/btree.h ./src/btreeInt.h ./src/build.c ./src/callback.c ./src/complete.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c ./src/func.c ./src/hash.c ./src/hash.h ./src/insert.c ./src/journal.c ./src/legacy.c ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem1.c ./src/mem2.c ./src/mem3.c ./src/mem4.c ./src/mem5.c ./src/mutex.c ./src/mutex.h ./src/mutex_os2.c ./src/mutex_unix.c ./src/mutex_w32.c ./src/os.c ./src/os.h ./src/os_common.h ./src/os_unix.c ./src/os_win.c ./src/os_os2.c ./src/pager.c ./src/pager.h ./src/parse.y ./src/pragma.c ./src/prepare.c ./src/printf.c ./src/random.c ./src/select.c ./src/shell.c ./src/sqlite.h.in ./src/sqlite3ext.h ./src/sqliteInt.h ./src/sqliteLimit.h ./src/table.c ./src/tclsqlite.c ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c ./src/vdbeblob.c ./src/vdbefifo.c ./src/vdbemem.c ./src/vdbeInt.h ./src/vtab.c ./src/where.c keywordhash.h opcodes.c opcodes.h parse.c parse.h config.h sqlite3.h ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c ./ext/fts1/fts1_tokenizer.h ./ext/fts1/fts1_tokenizer1.c ./ext/fts2/fts2.c ./ext/fts2/fts2.h ./ext/fts2/fts2_hash.c ./ext/fts2/fts2_hash.h ./ext/fts2/fts2_icu.c ./ext/fts2/fts2_porter.c ./ext/fts2/fts2_tokenizer.h ./ext/fts2/fts2_tokenizer.c ./ext/fts2/fts2_tokenizer1.c ./ext/fts3/fts3.c ./ext/fts3/fts3.h ./ext/fts3/fts3_hash.c ./ext/fts3/fts3_hash.h ./ext/fts3/fts3_icu.c ./ext/fts3/fts3_porter.c ./ext/fts3/fts3_tokenizer.h ./ext/fts3/fts3_tokenizer.c ./ext/fts3/fts3_tokenizer1.c ./ext/icu/icu.c tsrc
rm tsrc/sqlite.h.in tsrc/parse.y
touch .target_source
tclsh8.4 ./tool/mksqlite3c.tcl
./libtool --mode=compile --tag=CC /usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1  -c sqlite3.c
libtool: compile:  /usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c sqlite3.c  -fno-common -DPIC -o .libs/sqlite3.o
libtool: compile:  /usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
./libtool --mode=link /usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -L/opt/local/lib -arch i386 -arch ppc  -o libsqlite3.la sqlite3.lo  \
 -rpath "/opt/local/lib" -version-info "8:6:8"
libtool: link: /usr/bin/gcc-4.0 -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libsqlite3.0.dylib  .libs/sqlite3.o   -L/opt/local/lib  -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -arch i386 -arch ppc   -install_name  /opt/local/lib/libsqlite3.0.dylib -compatibility_version 9 -current_version 9.6 -Wl,-single_module
ld: flag: -undefined dynamic_lookup can't be used with MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: internal link edit command failed
lipo: can't figure out the architecture type of: /var/tmp//ccv1IZ8x.out
gnumake: *** [libsqlite3.la] Error 1

Error: Status 1 encountered during processing.
$

While MacPorts trunk sets MACOSX_DEPLOYMENT_TARGET correctly for the OS version, MacPorts 1.6.0 does not.

Attachments (2)

sqlite3-macosx-deployment-target.diff (501 bytes) - added by ryandesign (Ryan Schmidt) 11 years ago.
sqlite3-ncurses.diff (679 bytes) - added by ryandesign (Ryan Schmidt) 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by ryandesign (Ryan Schmidt)

comment:1 Changed 11 years ago by ryandesign (Ryan Schmidt)

The attached patch sets MACOSX_DEPLOYMENT_TARGET properly in the port. But even with this, sqlite3 +universal does not build properly. Now it says:

$ sudo port install sqlite3 +universal
--->  Fetching sqlite3
--->  Verifying checksum(s) for sqlite3
--->  Extracting sqlite3
--->  Configuring sqlite3
--->  Building sqlite3 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_databases_sqlite3/work/sqlite-3.5.9" && gnumake -j2 all " returned error 2
Command output: libtool: link: (cd ".libs" && rm -f "libsqlite3.dylib" && ln -s "libsqlite3.0.dylib" "libsqlite3.dylib")
libtool: link: ar cru .libs/libsqlite3.a  sqlite3.o
libtool: link: ranlib .libs/libsqlite3.a
libtool: link: ( cd ".libs" && rm -f "libsqlite3.la" && ln -s "../libsqlite3.la" "libsqlite3.la" )
./libtool --mode=link /usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -L/opt/local/lib -arch i386 -arch ppc  -DHAVE_READLINE=1 -I/opt/local/include \
-o sqlite3 ./src/shell.c libsqlite3.la \
-L/opt/local/lib -lreadline -lm  -rpath "/opt/local/lib"
libtool: link: /usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -arch i386 -arch ppc -DHAVE_READLINE=1 -I/opt/local/include -o .libs/sqlite3 ./src/shell.c  -L/opt/local/lib ./.libs/libsqlite3.dylib -lreadline -lm
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libncurses.5.dylib referenced from: /opt/local/lib/libreadline.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_tgetent referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetflag referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetnum referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetstr referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tputs referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgoto referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
collect2: ld returned 1 exit status
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: for architecture ppc
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libncurses.5.dylib referenced from: /opt/local/lib/libreadline.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_tgetent referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetflag referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetnum referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetstr referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tputs referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgoto referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccZxxcNF.out (No such file or directory)
gnumake: *** [sqlite3] Error 1

Error: Status 1 encountered during processing.
$

It should be looking for /opt/local/lib/libncurses.5.dylib, not /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libncurses.5.dylib.

comment:2 Changed 11 years ago by ryandesign (Ryan Schmidt)

Port: sqlite3 added
Summary: sqlite3 +universal build failuresqlite3 +universal build failure on Tiger

The attached patch sqlite3-macosx-deployment-target.diff is no longer necessary since MacPorts 1.7.0 is out which sets MACOSX_DEPLOYMENT_TARGET for us.

"can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/..." seems to be Tiger-specific, since I can build sqlite3 +universal just fine on Leopard. See #17925 and #18276 for similar issues. The fix there was to add a -l flag for the library in question to the ldflags; adding -lncurses to sqlite3's ldflags makes it build universal for me on Tiger/Intel. See new attached patch sqlite3-ncurses.diff.

Changed 11 years ago by ryandesign (Ryan Schmidt)

Attachment: sqlite3-ncurses.diff added

comment:3 Changed 11 years ago by mww@…

Resolution: fixed
Status: newclosed

commited!

comment:4 in reply to:  3 Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to mww@…:

commited!

in r46182

comment:5 Changed 10 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.