Opened 4 years ago
Closed 4 years ago
#61074 closed defect (invalid)
sqlite3 @3.33.0_0+universal: Failed to build sqlite3: command execution failed
Reported by: | qiet72 | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | ||
Port: | sqlite3 |
Description (last modified by qiet72)
sqlite3 3.33.0 will not compile on Mac OS X 10.7.5 (Darwin 11.4.2)
I have tried "sudo port clean --all sqlite3" and "sudo port install wine"
All port installs have been done without specifying "+universal" or using "+universal" in /opt/local/etc/macports/variants.conf
Strangely, doing "sudo port install sqlite3" works fine but not in conjunction with other ports requiring sqlite3.
:info:build 4 warnings generated. :info:build Undefined symbols for architecture x86_64: :info:build "___atomic_load_n", referenced from: :info:build _sqlite3_step in sqlite3-sqlite3.o :info:build _sqlite3RunParser in sqlite3-sqlite3.o :info:build _sqlite3WalFindFrame in sqlite3-sqlite3.o :info:build _sqlite3WalCheckpoint in sqlite3-sqlite3.o :info:build _walTryBeginRead in sqlite3-sqlite3.o :info:build _pcache1UnderMemoryPressure in sqlite3-sqlite3.o :info:build _sqlite3VdbeExec in sqlite3-sqlite3.o :info:build ... :info:build "___atomic_store_n", referenced from: :info:build _sqlite3_soft_heap_limit64 in sqlite3-sqlite3.o :info:build _sqlite3Malloc in sqlite3-sqlite3.o :info:build _sqlite3OomFault in sqlite3-sqlite3.o :info:build _sqlite3_step in sqlite3-sqlite3.o :info:build _sqlite3RunParser in sqlite3-sqlite3.o :info:build _sqlite3_interrupt in sqlite3-sqlite3.o :info:build _sqlite3_wal_checkpoint_v2 in sqlite3-sqlite3.o :info:build ... :info:build ld: symbol(s) not found for architecture x86_64
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3330000" && /usr/bin/gnumake -j4 -w all :info:build Exit code: 2 :error:build Failed to build sqlite3: command execution failed :debug:build Error code: CHILDSTATUS 31036 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/main.log for details.
Attachments (2)
Change History (58)
Changed 4 years ago by qiet72
comment:1 Changed 4 years ago by qiet72
Xcode version: 4.6.3
Command line tools version: September 2012
comment:2 Changed 4 years ago by qiet72
Description: | modified (diff) |
---|
comment:3 Changed 4 years ago by qiet72
Description: | modified (diff) |
---|
comment:4 Changed 4 years ago by qiet72
I downgraded xcode to version 4.1 and now sqlite3 compiles fine but when installing dosbox, legacy support fails to build. Will update when I find out more.
Will also test with Xcode 4.3.3.
comment:5 Changed 4 years ago by mf2k (Frank Schima)
Port: | dosbox wine removed |
---|
In the future, please add the port maintainer(s) to Cc (port info --maintainers sqlite3
), if any.
comment:6 Changed 4 years ago by mf2k (Frank Schima)
Owner: | set to Schamschula |
---|---|
Status: | new → assigned |
comment:7 Changed 4 years ago by Schamschula (Marius Schamschula)
I'm going to have to defer to those who maintain older systems. I have no way of testing any fixes for very old systems.
comment:8 follow-up: 15 Changed 4 years ago by qiet72
Marius, isn't it possible for you to test it under VMWare Fusion? Alternative is that I give you access to the test machine via ssh.
comment:9 Changed 4 years ago by qiet72
This is just an update: I am doing a full reinstall of all ports under Xcode 4.3.3 by doing the following:
sudo port uninstall installed
sudo port install dosbox
The dosbox port should test both sqlite3, bison, and legacy support can compile properly under Xcode 4.3.3.
comment:10 Changed 4 years ago by kencu (Ken)
Installs fine for me, didn't touch the portfile:
$ port -v installed sqlite3 The following ports are currently installed: sqlite3 @3.33.0_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-08-26T22:56:48-0700'
You should generally only use the very last xcode that your os supported, and the command line tools to match it. MacPorts is not tested against anything else. (only exception is Ryan likes to recommend Xcode 9 for 10.13 I believe).
If legacysupport won't build, you must have big troubles, as I made that port as easy to build as possible.
comment:11 Changed 4 years ago by kencu (Ken)
and FYI, dosbox installed fine too, no intervention:
$ port -v installed dosbox The following ports are currently installed: dosbox @0.74_6 (active) platform='darwin 11' archs='i386' date='2020-08-27T07:23:54-0700'
dosbox-x won't install on 10.7 yet, as I haven't fixed it for 10.7 so far.
comment:12 Changed 4 years ago by kencu (Ken)
Here's my 10.7.5 setup:
macOS 10.7.5 11G63 Xcode 4.6.3 4H1503
comment:13 Changed 4 years ago by qiet72
What would you recommend for Xcode on Mac OS X 10.7.5?
The latest I can see is 4.6.3 which is said to work on both 10.8 and 10.7.
Regarding command line tools, the latest I can see is the September 2012 version.
comment:14 Changed 4 years ago by qiet72
Hmm, still getting sqlite3 build errors, builds fine on 4.1, but 4.3.3 and 4.6.3, it fails with this:
:info:build ld: symbol(s) not found for architecture x86_64 :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build gnumake: *** [sqlite3] Error 1
comment:15 Changed 4 years ago by Schamschula (Marius Schamschula)
Replying to qiet72:
Marius, isn't it possible for you to test it under VMWare Fusion? Alternative is that I give you access to the test machine via ssh.
It's a time issue. I'm rather busy dealing with teaching my classes online, i.e. moving in person lectures to pre-recorded ones, never mind I have a pair of proposals in work.
More to the point, there are other MacPorts maintainers who are familiar with back porting newer packages to older OS versions.
comment:16 follow-up: 18 Changed 4 years ago by qiet72
The test equipment I am using is a MacBook Pro Mid-2012 - 64 bit with 4 processors.
comment:17 Changed 4 years ago by qiet72
Thanks Marius and Ken as well. I think I will re-install 10.7.5 fresh and go with Xcode 4.6.3 and command line tools sept 2012.
Will let you know the results.
comment:18 Changed 4 years ago by kencu (Ken)
Replying to qiet72:
The test equipment I am using is a MacBook Pro Mid-2012 - 64 bit with 4 processors.
I think that system came with 10.7.5, but can upgrade to Catalina, if I'm right (I have a similar one running Catalina).
I don't know if you're specifically targeting 10.7.5, in which case that's fine, we'll get you in business, but if you're looking for functionality and easy of use, High Sierra, Mojave, or Catalina will go a long way to making your life easier.
comment:19 Changed 4 years ago by Schamschula (Marius Schamschula)
Yes, it looks like your machine could run Catalina
However, Mojave is still more stable.
comment:20 Changed 4 years ago by qiet72
Hey guys,
Yes, it can run Catalina and it works fine with Catalina. The great thing about this macbook is that I can create netboot images for all Mac OS X versions from 10.7.5 -> 10.14 and that is my project along with macports installed. I would like to use the netboot images as a way of trying mac os on different macs without installing mac os on them or running what is already installed on them. The netboot environment gives me a static environment that I can play with without affecting whatever is on the local storage of each mac. 10.7.5 is quite interesting because it can run on quite a range of macs. I have 4 different mac's that can run 10.7.5 - some can run from 10.4 -> 10.7.5, others from 10.7.5 -> 10.15, etc. Netboot is also interesting in that I am allowed to really mess up the netboot root file system if I need to and if I need to go back to an original state, I can just reboot.
comment:21 Changed 4 years ago by kencu (Ken)
tangential, but I have dosbox-x
building on 10.7.5, if you'd like to try that. I will test this out on a few more systems before pushing:
$ port -v installed dosbox-x The following ports are currently installed: dosbox-x @0.83.4_0 (active) platform='darwin 11' archs='x86_64' date='2020-08-27T22:56:36-0700'
<https://github.com/kencu/macports-ports/tree/dosboxxoldersystems/emulators/dosbox-x>
comment:22 Changed 4 years ago by qiet72
ok, I did a fresh install of mac os x 10.7.5 with all updates. I then installed Xcode 4.6.3 and the command line tools for November 2012. Installed MacPorts 2.6.3 via pkg. Then without installing anything else, I did the following; "sudo port -N install dosbox". The sqlite3 port fails to compile again:
:info:build /bin/sh ./libtool --tag=CC --mode=link /usr/bin/clang -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLIT E_ENABLE_GEOPOLY -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -pipe -Os -arch x86_64 -arch i386 -L/opt/local /lib -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 -o sqlite3 sqlite3-shell.o sqlite3-sqlite3.o -ledit -lz :info:build libtool: link: /usr/bin/clang -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY -DSQLIT E_HAVE_ZLIB -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -pipe -Os -arch x86_64 -arch i386 -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 -o sqlite3 sqlite3-shell.o sqlite3-sqlite3.o -L/opt/local/lib /opt/local/lib/libedit.dylib -lz :info:build Undefined symbols for architecture x86_64: :info:build "___atomic_load_n", referenced from: :info:build _sqlite3_step in sqlite3-sqlite3.o :info:build _sqlite3RunParser in sqlite3-sqlite3.o :info:build _sqlite3WalFindFrame in sqlite3-sqlite3.o :info:build _sqlite3WalCheckpoint in sqlite3-sqlite3.o :info:build _walTryBeginRead in sqlite3-sqlite3.o :info:build _pcache1UnderMemoryPressure in sqlite3-sqlite3.o :info:build _sqlite3VdbeExec in sqlite3-sqlite3.o :info:build ... :info:build "___atomic_store_n", referenced from: :info:build _sqlite3_soft_heap_limit64 in sqlite3-sqlite3.o :info:build _sqlite3Malloc in sqlite3-sqlite3.o :info:build _sqlite3OomFault in sqlite3-sqlite3.o :info:build _sqlite3_step in sqlite3-sqlite3.o :info:build _sqlite3RunParser in sqlite3-sqlite3.o :info:build _sqlite3_interrupt in sqlite3-sqlite3.o :info:build _sqlite3_wal_checkpoint_v2 in sqlite3-sqlite3.o :info:build ... :info:build ld: symbol(s) not found for architecture x86_64 :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build gnumake: *** [sqlite3] Error 1 :info:build gnumake: *** Waiting for unfinished jobs.... :info:build gnumake: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3330000' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3330000" && /usr/bin/gnumake -j4 -w all :info:build Exit code: 2 :error:build Failed to build sqlite3: command execution failed :debug:build Error code: CHILDSTATUS 8432 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/main.log for details.
comment:23 Changed 4 years ago by qiet72
Ok, if I do the following, then sqlite3 compiles successfully:
localhost:~ user$ sudo port clean --all sqlite3 Password: ---> Cleaning sqlite3 localhost:~ user$ sudo port -N install sqlite3 ---> Computing dependencies for sqlite3 ---> Fetching archive for sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0.darwin_11.x86_64.tbz2 from http://cph.dk.packages.macports.org/sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0.darwin_11.x86_64.tbz2.rmd160 from http://cph.dk.packages.macports.org/sqlite3 ---> Installing sqlite3 @3.33.0_0 ---> Activating sqlite3 @3.33.0_0 ---> Cleaning sqlite3 ---> Updating database of binaries ---> Updating database of C++ stdlib usage ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. localhost:~ user$ sudo port installed|grep sq Password: sqlite3 @3.33.0_0 (active) localhost:~ user$
comment:24 Changed 4 years ago by qiet72
The strange thing is even though sqlite3 is installed and activated, dosbox insists on downloading and recompiling the same version of sqlite3 and here it fails again:
localhost:~ user$ sudo port installed|grep sq Password: sqlite3 @3.33.0_0 (active) localhost:~ user$ sudo port -N install dosbox ---> Computing dependencies for dosbox ---> Dependencies to be installed: libsdl_sound physfs cmake clang-3.4 python27 sqlite3 curl curl-ca-bundle libidn2 libunistring libpsl glib2 pcre python38 python3_select legacy-support libarchive lz4 lzo2 zstd libuv libtool doxygen bison bison-runtime clang-9.0 cctools libunwind-headers libomp llvm-9.0 xar m4 flex git p5.28-authen-sasl p5.28-digest-hmac p5.28-digest-sha1 p5.28-gssapi kerberos5 libcomerr coreutils gmp p5.28-cgi p5.28-html-parser p5.28-html-tagset p5.28-error p5.28-net-smtp-ssl p5.28-io-socket-ssl p5.28-mozilla-ca p5.28-net-libidn libidn p5.28-net-ssleay p5.28-term-readkey pcre2 rsync popt xxhashlib smpeg speex ---> Fetching archive for sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0+universal.darwin_11.i386-x86_64.tbz2 from http://cph.dk.packages.macports.org/sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0+universal.darwin_11.i386-x86_64.tbz2 from https://packages.macports.org/sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0+universal.darwin_11.i386-x86_64.tbz2 from http://nue.de.packages.macports.org/sqlite3 ---> Fetching distfiles for sqlite3 ---> Attempting to fetch sqlite-autoconf-3330000.tar.gz from http://cph.dk.distfiles.macports.org/sqlite3 ---> Verifying checksums for sqlite3 ---> Extracting sqlite3 ---> Configuring sqlite3 ---> Building sqlite3 Error: Failed to build sqlite3: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port dosbox failed
Is this because it wants the univeral variant of it?
comment:25 Changed 4 years ago by qiet72
Confirmed. If I do a "sudo port clean --all sqlite3; sudo port install sqlite3 +universal" then it fails.
But, if I do a "sudo port clean --all sqlite3; sudo port install sqlite3", then the build compiles successfully.
What is the difference between the universal and the non-universal variant of sqlite3??
comment:26 follow-up: 28 Changed 4 years ago by qiet72
ok, I did a total cleanup of macports with "sudo port -fp uninstall installed", enabled "+universal" in /opt/local/etc/macports/variants.conf and finally "sudo port -N install dosbox" - build still fails with sqlite3 (apparently universal) build.
Regarding "+universal" - I am guessing that if it is enabled, port builds both a 64-bit and a 32-bit binary?
comment:27 Changed 4 years ago by qiet72
Restarted over (System with no xcode or macports) and installed xcode 4.2.1 and macports 2.6.3.
"sudo port install sqlite3 +universal" compiles successfully
Testing currently dosbox to see if it can go all the way.
comment:28 Changed 4 years ago by kencu (Ken)
Replying to qiet72:
Regarding "+universal" - I am guessing that if it is enabled, port builds both a 64-bit and a 32-bit binary?
Yep.
It seems likely that was your issue all along.
dosbox is i386 only, but most ports on 10.7 are x86_64, and so all dosbox's supporting ports need to be universal, not just i386, for the system to work properly.
Normally MacPorts will take care of all that for you, I'm not clear on why you are having to intervene to make it happen in this case.
All of this headache is part of the reason why I brought in dosbox-x, which is x86_64.
comment:29 Changed 4 years ago by qiet72
xcode 4.2.1 seems to be doing pretty good in compiling most things universal. Legacy-supports fails building when doing "sudo port -N install dosbox" but if I manually do it with "sudo port -N install legacy-support" then it builds fine with universal and I can compile further with dosbox.
Regarding sqlite3, it builds fine under xcode 4.2.1 but fails with xcode 4.3 and up if you go universal. This is where this bug report comes in and needs to be looked into. Ken, can you check if you can compile sqlite3 universal under 10.7.5 and xcode 4.3 or higher?
comment:30 Changed 4 years ago by kencu (Ken)
fine:
$ port -v installed | grep sqlite sqlite3 @3.33.0_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-08-26T22:56:48-0700'
I don't think you should be hacking around so much with xcode versions like that.
You'll make a mess, and have to start over again.
comment:31 Changed 4 years ago by qiet72
Hey Ken,
I actually have the perfect environment for testing. It is my 10.7.5 netboot environment. It is a clean install of 10.7.5 without any development tools or macports installed. So we can test on that. When it gets messy, I just reboot, and it goes back to a state of clean install again.
comment:32 Changed 4 years ago by qiet72
When Xcode 4.6.3 is installed, I double checked the version using xcodebuild -version:
Xcode 4.6.3 Build version 4H1503
comment:33 Changed 4 years ago by kencu (Ken)
You are having atomic linking errors showing no x86_64 architecture in libatomic... which is weird.
Perhaps you are picking up a wrong libatomic somewhere?
I have:
$ port -v installed | grep libgcc libgcc @3.0_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-05-17T20:20:35-0700' libgcc6 @6.5.0_4 (active) platform='darwin 11' archs='x86_64' date='2019-08-24T11:27:54-0700' libgcc7 @7.5.0_0 (active) platform='darwin 11' archs='x86_64' date='2019-11-21T08:02:09-0800' libgcc8 @8.4.0_0 (active) platform='darwin 11' archs='x86_64' date='2020-03-23T17:43:14-0700' libgcc9 @9.3.0_1 (active) platform='darwin 11' archs='x86_64' date='2020-05-11T18:42:27-0700' libgcc10 @10.2.0_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-07-25T19:09:00-0700'
which I notice is not quite ideal (as some libgcc versions are not built universal, and some are, which is going to be a recipe for trouble in the future and I'll have to fix that), but at least all of libgccN exists as x86_64.
What do you have with port -v installed | grep libgcc
?
comment:34 Changed 4 years ago by qiet72
Hi,
ok, started out with clean 10.7.5 with all updates, no xcode or macports installed. I then installed xcode 4.6.3, then command line tools nov 2012, then macports 2.6.3. After that, I did the following at the command line:
localhost:~ user$ xcode-select -print-path /Applications/Xcode.app/Contents/Developer localhost:~ user$ xcodebuild -version Xcode 4.6.3 Build version 4H1503 localhost:~ user$ port -v installed No ports are installed. localhost:~ user$ cat /opt/local/etc/macports/variants.conf|tail -n1 +universal localhost:~ user$ sudo port -N install sqlite3 ---> Computing dependencies for sqlite3 ---> Dependencies to be installed: libedit ncurses zlib ---> Fetching archive for ncurses ---> Attempting to fetch ncurses-6.2_0+universal.darwin_11.i386-x86_64.tbz2 from http://cph.dk.packages.macports.org/ncurses ---> Attempting to fetch ncurses-6.2_0+universal.darwin_11.i386-x86_64.tbz2.rmd160 from http://cph.dk.packages.macports.org/ncurses ---> Installing ncurses @6.2_0+universal ---> Activating ncurses @6.2_0+universal ---> Cleaning ncurses ---> Fetching archive for libedit ---> Attempting to fetch libedit-20191231-3.1_0+universal.darwin_11.i386-x86_64.tbz2 from http://cph.dk.packages.macports.org/libedit ---> Attempting to fetch libedit-20191231-3.1_0+universal.darwin_11.i386-x86_64.tbz2.rmd160 from http://cph.dk.packages.macports.org/libedit ---> Installing libedit @20191231-3.1_0+universal ---> Activating libedit @20191231-3.1_0+universal ---> Cleaning libedit ---> Fetching archive for zlib ---> Attempting to fetch zlib-1.2.11_0+universal.darwin_11.i386-x86_64.tbz2 from http://cph.dk.packages.macports.org/zlib ---> Attempting to fetch zlib-1.2.11_0+universal.darwin_11.i386-x86_64.tbz2.rmd160 from http://cph.dk.packages.macports.org/zlib ---> Installing zlib @1.2.11_0+universal ---> Activating zlib @1.2.11_0+universal ---> Cleaning zlib ---> Fetching archive for sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0+universal.darwin_11.i386-x86_64.tbz2 from http://cph.dk.packages.macports.org/sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0+universal.darwin_11.i386-x86_64.tbz2 from https://packages.macports.org/sqlite3 ---> Attempting to fetch sqlite3-3.33.0_0+universal.darwin_11.i386-x86_64.tbz2 from http://nue.de.packages.macports.org/sqlite3 ---> Fetching distfiles for sqlite3 ---> Attempting to fetch sqlite-autoconf-3330000.tar.gz from http://cph.dk.distfiles.macports.org/sqlite3 ---> Verifying checksums for sqlite3 ---> Extracting sqlite3 ---> Configuring sqlite3 ---> Building sqlite3 Error: Failed to build sqlite3: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port sqlite3 failed localhost:~ user$ port -v installed The following ports are currently installed: libedit @20191231-3.1_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-08-29T11:11:25+0200' ncurses @6.2_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-08-29T11:11:20+0200' zlib @1.2.11_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-08-29T11:11:26+0200' localhost:~ user$ sw_vers ProductName: Mac OS X ProductVersion: 10.7.5 BuildVersion: 11G63 localhost:~ user$
Here is the relevant section of main.log:
:info:build /bin/sh ./libtool --tag=CC --mode=link /usr/bin/clang -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -pipe -Os -arch x86_64 -arch i386 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 -o sqlite3 sqlite3-shell.o sqlite3-sqlite3.o -ledit -lz :info:build 4 warnings generated. :info:build libtool: compile: /usr/bin/clang -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.33.0\" "-DPACKAGE_STRING=\"sqlite 3.33.0\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.33.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_EDITLINE_READLINE_H=1 -DHAVE_EDITLINE=1 -DHAVE_ZLIB_H=1 -I. -DSQLITE_DISABLE_INTRINSIC -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SOUNDEX -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3330000 -I/opt/local/include -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY -DSQLITE_HAVE_ZLIB -pipe -Os -arch x86_64 -arch i386 -c sqlite3.c -o sqlite3.o >/dev/null 2>&1 :info:build libtool: link: /usr/bin/clang -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY -DSQLITE_HAVE_ZLIB -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB -pipe -Os -arch x86_64 -arch i386 -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 -o sqlite3 sqlite3-shell.o sqlite3-sqlite3.o -L/opt/local/lib /opt/local/lib/libedit.dylib -lz :info:build Undefined symbols for architecture x86_64: :info:build "___atomic_load_n", referenced from: :info:build _sqlite3_step in sqlite3-sqlite3.o :info:build _sqlite3RunParser in sqlite3-sqlite3.o :info:build _sqlite3WalFindFrame in sqlite3-sqlite3.o :info:build _sqlite3WalCheckpoint in sqlite3-sqlite3.o :info:build _walTryBeginRead in sqlite3-sqlite3.o :info:build _pcache1UnderMemoryPressure in sqlite3-sqlite3.o :info:build _sqlite3VdbeExec in sqlite3-sqlite3.o :info:build ... :info:build "___atomic_store_n", referenced from: :info:build _sqlite3_soft_heap_limit64 in sqlite3-sqlite3.o :info:build _sqlite3Malloc in sqlite3-sqlite3.o :info:build _sqlite3OomFault in sqlite3-sqlite3.o :info:build _sqlite3_step in sqlite3-sqlite3.o :info:build _sqlite3RunParser in sqlite3-sqlite3.o :info:build _sqlite3_interrupt in sqlite3-sqlite3.o :info:build _sqlite3_wal_checkpoint_v2 in sqlite3-sqlite3.o :info:build ... :info:build ld: symbol(s) not found for architecture x86_64 :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build gnumake: *** [sqlite3] Error 1 :info:build gnumake: *** Waiting for unfinished jobs.... :info:build gnumake: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3330000' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3330000" && /usr/bin/gnumake -j4 -w all :info:build Exit code: 2 :error:build Failed to build sqlite3: command execution failed :debug:build Error code: CHILDSTATUS 2577 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_sqlite3/sqlite3/main.log for details.
MacPorts does not consider any other dependencies besides ncurses, libedit, and zlib. Apparently the sqlite3 build uses the default compilers from Xcode.
comment:35 Changed 4 years ago by qiet72
I noticed this in main.log:
Preferred compilers: clang macports-clang-9.0 macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0 macports-clang-3.7 macports-clang-3.4
But Xcode 4.6.3 only provides clang 4.1:
localhost:~ user$ clang --version Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix localhost:~ user$
Maybe sqlite is missing a dependency for one of the other compilers?
comment:36 Changed 4 years ago by kencu (Ken)
sqlite3 builds for me with the system xcode clang.
The way it looks to me is that you can't build anything at all. All the ports you have managed to install have been prebuilt binary downloads. Anything you actually try to build fails.
I would first of all try a simple "hello, world" program in "c" and then in "c++" and make sure your basic kit is even functional. If not, fix that. Once you get that working, try building from source the simplest port possible -- perhaps "ncurses" that has no dependencies.
To build from source, you have to force that to happen, otherwise you get a pre-built binary. So do this:
sudo port -f uninstall installed sudo port -v reclaim sudo port -v -s install ncurses
and then report back what is broken here.
comment:37 Changed 4 years ago by qiet72
Hi,
First "hello world" test:
localhost:t user$ sw_vers ProductName: Mac OS X ProductVersion: 10.7.5 BuildVersion: 11G63 localhost:t user$ xcodebuild -version Xcode 4.6.3 Build version 4H1503 localhost:t user$ clang --version Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix localhost:t user$ port version Version: 2.6.3 localhost:t user$ ls -al total 8 drwxr-xr-x 3 user staff 102 30 Aug 19:24 . drwxr-xr-x+ 17 user staff 578 30 Aug 19:23 .. -rw-r--r-- 1 user staff 129 30 Aug 19:23 hello.c localhost:t user$ cat hello.c #include <stdio.h> int main() { // printf() displays the string inside quotation printf("Hello, World!\n"); return 0; } localhost:t user$ clang -o hello hello.c localhost:t user$ ls -al total 32 drwxr-xr-x 4 user staff 136 30 Aug 19:26 . drwxr-xr-x+ 17 user staff 578 30 Aug 19:23 .. -rwxr-xr-x 1 user staff 8696 30 Aug 19:26 hello -rw-r--r-- 1 user staff 129 30 Aug 19:23 hello.c localhost:t user$ ./hello Hello, World! localhost:t user$
Now, ncurses build test:
localhost:t user$ port installed No ports are installed. localhost:t user$ sudo port -s install ncurses Password: ---> Fetching distfiles for ncurses ---> Verifying checksums for ncurses ---> Extracting ncurses ---> Applying patches to ncurses ---> Configuring ncurses ---> Building ncurses ---> Staging ncurses into destroot Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/form.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/menu.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/ncurses.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/ncurses++.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/panel.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/bin/ncurses6-config ---> Installing ncurses @6.2_0 ---> Activating ncurses @6.2_0 ---> Cleaning ncurses ---> Updating database of binaries ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. localhost:t user$ port -v installed The following ports are currently installed: ncurses @6.2_0 (active) platform='darwin 11' archs='x86_64' date='2020-08-30T19:29:24+0200' localhost:t user$
Any other ideas?
comment:38 Changed 4 years ago by qiet72
Also tried with the commands you suggested:
localhost:t user$ sudo port -f uninstall installed ---> Deactivating ncurses @6.2_0 ---> Cleaning ncurses ---> Uninstalling ncurses @6.2_0 ---> Cleaning ncurses localhost:t user$ sudo port -v reclaim ---> Checking for unnecessary unrequested ports Found no unrequested ports without requested dependents. ---> Checking for inactive ports Found no inactive ports. ---> Building list of distfiles still in use ---> Searching for unused distfiles Found unused distfile /opt/local/var/macports/distfiles/ncurses/ncurses-6.2.tar.gz Found 1 files (total 3.27 MiB) that are no longer needed and can be deleted. [l]ist/[d]elete/[K]eep: d Deleting... Deleting unused file /opt/local/var/macports/distfiles/ncurses/ncurses-6.2.tar.gz Deleting empty directory /opt/local/var/macports/distfiles/ncurses localhost:t user$ sudo port -s install ncurses ---> Fetching distfiles for ncurses ---> Attempting to fetch ncurses-6.2.tar.gz from http://cph.dk.distfiles.macports.org/ncurses ---> Verifying checksums for ncurses ---> Extracting ncurses ---> Applying patches to ncurses ---> Configuring ncurses Warning: reinplace s/1UL/1U/g didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/ncurses-6.2/include/curses.head ---> Building ncurses ---> Staging ncurses into destroot Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/form.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/menu.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/ncurses.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/ncurses++.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/lib/pkgconfig/panel.pc Warning: reinplace s|-Wl,-syslibroot,|| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ncurses/ncurses/work/destroot/opt/local/bin/ncurses6-config ---> Installing ncurses @6.2_0+universal ---> Activating ncurses @6.2_0+universal ---> Cleaning ncurses ---> Updating database of binaries ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. localhost:t user$ port -v installed The following ports are currently installed: ncurses @6.2_0+universal (active) platform='darwin 11' archs='i386 x86_64' date='2020-08-30T19:37:20+0200'
comment:39 Changed 4 years ago by qiet72
Here is some interesting observations (all build tests using +universal):
Under Xcode 4.6.3, when installing dosbox or wine, everything builds except for sqlite3.
Under Xcode 4.2.1, when installing dosbox or wine, everything builds (including sqlite3) except bison - this is because bison is dependent on clang-mp-9.0 which fails execution both as a pre-built binary and as a locally built binary.
comment:40 Changed 4 years ago by kencu (Ken)
clang-9.0 works properly on 10.7.5. What error do you see?
The only configuration we can support is with the latest xcode, sorry.
comment:41 Changed 4 years ago by qiet72
Hi,
Yes, you are right. I only wanted to see if sqlite3 could compile under a different version of xcode other than the supported version, which, in this case, it can. Regarding clang-9.0 and bison - there are no problems with them under the latest supported xcode. So, I think we are still back to square one: why does sqlite3 universal compilation fail under the latest supported xcode 4.6.3?
comment:42 Changed 4 years ago by qiet72
Before Xcode 4.3, the IDE and Command line tools were one. Since Xcode 4.3, the two were split up and now it is possible to only install the Command Line Tools without installing the multi-gigabyte large Xcode IDE. Can MacPorts work with only Command Line Tools installed? Also, what is the latest supported command line tools used on Mac OS X 10.7 Lion that MacPorts support??
comment:43 Changed 4 years ago by qiet72
I have a feeling that maybe the problem relates to the command line tools installation. Ken, what version of command line tools are you using? I am using the one from November 2012.
comment:44 Changed 4 years ago by qiet72
Confirmed: MacPorts requires the full Xcode as well as the command line tools installed - I tested this with only command line tools installed:
Error: Error: No Xcode installation was found. Error: Please install Xcode and/or run xcode-select to specify its location. Error:
comment:45 Changed 4 years ago by kencu (Ken)
I think you might have hit on your issue.
On almost all macOS versions, for MacPorts to build all the ports it can build, you need xcode and the matching CLTs, latest version.
comment:46 Changed 4 years ago by kencu (Ken)
here is the MacPorts guide for installation <https://guide.macports.org/chunked/installing.html> wherein installing both Xcode and the command line tools is specified.
There was an "attempt" to see if we might just get away with the command line tools only for certain situations, and a few people did quite a bit of work on that; in the end, I believe it was considered to be basically a failure, and although a subset of ports do install with just the CLTs, there were too many issues with ports that wouldn't build due to lack of Xcode, and that push seems to have died out as of late, largely.
Once you confirm that this fixes your 10.7.5 builds, I think we can close this ticket. Please report back if so.
comment:47 Changed 4 years ago by qiet72
If I install Xcode 4.6.3, then start it up and go into Xcode -> Preferences -> Downloads -> Check and Install Now, then it says "No updates available" and also "No components available". That is why I had to download and install Command Line Tools via developer.apple.com and as far as I can see the last version for Lion is from November 2012. So, I would like to ask you again, what version of Command Line Tools are you using Ken?
comment:48 Changed 4 years ago by qiet72
ok, I tried this again: Clean install of Mac OS X 10.7.5 Lion with all updates -> install Xcode 4.6.3, install Command Line Tools Nov 2012, install MacPorts 2.6.3, then "sudo port install sqlite3 +universal". Exactly the same problem: "Undefined symbols for architecture x86_64". So, we are still back at square one.
comment:49 Changed 4 years ago by kencu (Ken)
OK. Please don't touch another thing. Keep your xcode at the current latest one, keep your command line tools at the current latest one. Let's go from here.
This works for me, and (I think) for everyone else, so let's see what is wrong with your setup.
I am not at my 10.7.5 machine today, so I will not be able to answer your question about my command line tools for 12 hours minimum. But I know I have the latest ones installed, so please let us see what you have.
/usr/bin/clang -v
should give us an idea.
comment:50 Changed 4 years ago by kencu (Ken)
Here is mine:
$ /usr/bin/clang -v Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
comment:51 Changed 4 years ago by kencu (Ken)
and here's the log from my building sqlite3 +universal on Lion.
Changed 4 years ago by kencu (Ken)
Attachment: | sqlite3-lion-universal.log added |
---|
comment:52 Changed 4 years ago by qiet72
Here is mine:
localhost:~ user$ clang -v Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
localhost:~ user$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
localhost:~ user$ xcodebuild -version Xcode 4.6.3 Build version 4H1503 localhost:~ user$
Looks like command line tools is not pointing to the newest compiler?
comment:53 Changed 4 years ago by qiet72
ok, I checked developer.apple.com again and I found a newer Command Line Tools - this time from April 2013. Can you confirm if this is the version you are also using?
comment:54 Changed 4 years ago by kencu (Ken)
once the versions match.
I just installed the last one available. I didn't write down the month and year. It was a long time ago now...
comment:55 Changed 4 years ago by qiet72
Hi,
clang versions now match and upgrading the Command Line Tools seems to have fixed sqlite3 now. :-) Maybe this should be reflected within the installation notes? I doubt that there will be a later version than April 2013 anyways.
I think we can conclude the problem was because of a wrong version of Command Line Tools and I think we can safely close this bug report. Thanks a lot Ken! :-)
comment:56 Changed 4 years ago by kencu (Ken)
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
thanks for confirming
Build error log file for sqlite3 on Darwin Kernel Version 11.4.2