Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#72018 closed defect (fixed)

sqlite3 @3.49.0 build fails: ld: in /opt/local/lib, can't map file, errno=22

Reported by: barracuda156 Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: haspatch Cc:
Port: sqlite3

Description

Not sure what this means, perhaps related to extensive changes to the portfile in this version:

--->  Extracting sqlite-autoconf-3490000.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/sqlite3/sqlite-autoconf-3490000.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
--->  Applying patches to sqlite3
--->  Applying patch-sqlite3_fix-atomic-clang-4.diff
Executing:  cd "/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000" && /usr/bin/patch -t -N -p0 < '/opt/local/ppcports/databases/sqlite3/files/patch-sqlite3_fix-atomic-clang-4.diff'
patching file sqlite3.c
Hunk #1 succeeded at 14287 (offset 839 lines).
--->  Configuring sqlite3
Executing:  cd "/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000" && ./configure --prefix=/opt/local --enable-threadsafe --disable-readline --enable-editline AWK=/usr/bin/awk 
2025-02-08 03:21:30.537 tclsh[26610:907] CFPreferences: user home directory at file://localhost/opt/local/var/macports/home/ is unavailable. User domains will be volatile.
Host System...powerpc-apple-darwin10.8.0
Build System...powerpc-apple-darwin10.8.0
C compiler... /usr/bin/gcc-4.2 -pipe -Os -arch ppc -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_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000 -I/opt/local/include
C++ compiler... /usr/bin/g++-4.2 -pipe -Os -arch ppc -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_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000 -I/opt/local/include
Build C compiler...cc
Checking for stdlib.h...ok
Source dir = /opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000
Build dir  = /opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000
Configuring SQLite version 3.49.0
Looking for install ... /usr/bin/install
Checking for int8_t...ok
Checking for int16_t...ok
Checking for int32_t...ok
Checking for int64_t...ok
Checking for intptr_t...ok
Checking for uint8_t...ok
Checking for uint16_t...ok
Checking for uint32_t...ok
Checking for uint64_t...ok
Checking for uintptr_t...ok
Checking for gmtime_r...ok
Checking for isnan...ok
Checking for localtime_r...ok
Checking for localtime_s...not found
Checking for malloc_usable_size...not found
Checking for strchrnul...not found
Checking for usleep...ok
Checking for utime...ok
Checking for pread...ok
Checking for pread64...not found
Checking for pwrite...ok
Checking for pwrite64...not found
Checking libs for fdatasync...none needed
Checking for sys/types.h...ok
Checking for sys/stat.h...ok
Checking for dlfcn.h...ok
Checking for unistd.h...ok
Checking for stdlib.h...(cached) ok
Checking for malloc.h...not found
Checking for memory.h...ok
Checking for string.h...ok
Checking for strings.h...ok
Checking for inttypes.h...ok
Checking for zlib.h...ok
Checking libs for deflate...-lz
Checking whether the C compiler accepts -rpath /opt/local/lib...yes
SQLITE_DEBUG build? no
Support threadsafe operation? yes
Checking libs for pthread_create...none needed
Checking libs for pthread_mutexattr_init...none needed
Checking for line-editing capability...
Checking libs for tgetent...-lncurses
Checking libs for readline...-ledit
Using editline flags: -I/opt/local/include -ledit -lncurses
Line-editing support for the sqlite3 shell: editline
Checking libs for dlopen...none needed
Checking libs for ceil...none needed
Enabling math SQL functions 
ICU support is disabled.
Checking whether the C compiler accepts -Wl,-current_version,9.6.0...yes
Checking whether the C compiler accepts -Wl,-compatibility_version,9.0.0...yes
Feature flags...
  - fts4
  - fts5
  - geopoly
  - rtree
  - session
  - update-limit
  - memsys5
  - memsys3
  + json
Library feature flags: -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_THREADSAFE=1
Shell options: -DHAVE_EDITLINE=1 -DSQLITE_HAVE_ZLIB=1
Created Makefile from Makefile.in
Created sqlite3.pc from sqlite3.pc.in
Created sqlite_cfg.h
--->  Building sqlite3
Executing:  cd "/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000" && /usr/bin/gnumake -j6 -w all 
gnumake: Entering directory `/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000'
/usr/bin/gcc-4.2 -c sqlite3.c -o sqlite3.o -pipe -Os -arch ppc -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_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000 -I/opt/local/include -I. -dynamic  -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_THREADSAFE=1
/usr/bin/gcc-4.2 -o sqlite3 \
		shell.c sqlite3.c \
		-I. -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_THREADSAFE=1 -DHAVE_EDITLINE=1 -DSQLITE_HAVE_ZLIB=1 \
		-pipe -Os -arch ppc -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_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000 -I/opt/local/include -I/opt/local/include  \
		 -rpath /opt/local/lib    -lz  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -ledit -lncurses
/usr/bin/gcc-4.2 -o libsqlite3.dylib  sqlite3.o -dynamiclib \
		 -rpath /opt/local/lib    -lz  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc \
		-Wl,-compatibility_version,9.0.0 -Wl,-current_version,9.6.0 
ar cr libsqlite3.a sqlite3.o
ld: in /opt/local/lib, can't map file, errno=22
collect2: ld returned 1 exit status
gnumake: *** [libsqlite3.dylib] Error 1
gnumake: *** Waiting for unfinished jobs....
ld: in /opt/local/lib, can't map file, errno=22
collect2: ld returned 1 exit status
gnumake: *** [sqlite3] Error 1
gnumake: Leaving directory `/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_ppcports_databases_sqlite3/sqlite3/work/sqlite-autoconf-3490000" && /usr/bin/gnumake -j6 -w all 
Exit code: 2
Error: Failed to build sqlite3: command execution failed

Attachments (1)

main.log (20.4 KB) - added by barracuda156 12 months ago.

Download all attachments as: .zip

Change History (10)

Changed 12 months ago by barracuda156

Attachment: main.log added

comment:1 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Apparently sqlite3 was using libtool and in this version they've thrown that out without apparently understanding how any of it worked.

comment:2 in reply to:  1 Changed 12 months ago by barracuda156

Replying to ryandesign:

Apparently sqlite3 was using libtool and in this version they've thrown that out without apparently understanding how any of it worked.

Could you suggest a fix? Perhaps no one will bother fixing it in master for powerpc, but being stuck at 3.48.0 indefinitely is not amazing.

comment:3 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

We had successful builds on all buildbot systems. I don't know why it fails for you. This talks about the error message but I don't see how the proposed fix applies here:

https://www.alecjacobson.com/weblog/906.html

(-L /opt/local/lib, with a space, does not appear in our build)

Last edited 12 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Maybe it's -rpath /opt/local/lib. We don't want that anyway. You could try removing it.

comment:5 in reply to:  4 Changed 12 months ago by barracuda156

Replying to ryandesign:

Maybe it's -rpath /opt/local/lib. We don't want that anyway. You could try removing it.

You are absolutely right, removing $(LDFLAGS.rpath) from MacPorts-supplied Makefile.in worked.

comment:6 Changed 12 months ago by tramir (Mircea Trandafir)

Will there be an official fix? Or can you provide some instructions for how to proceed? I tried removing $(LDFLAGS.rpath) from the file Makefile.in in the build directory, but was not able to get past the error (port upgrade failed even after a successful ./configure). Thanks!

comment:7 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:8 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 8707fad8630a14d230bdcc612d08ca19d30f4180/macports-ports (master):

sqlite3: Avoid rpath; tweak install name

Don't use -rpath since it's never needed and causes an error with older
compilers.

Closes: #72018

Change the install name from /opt/local/lib/libsqlite3.dylib back to
/opt/local/lib/libsqlite3.0.dylib as it was in 3.48.0 and earlier.

Simplify how the install name is fixed and do so in post-build not
post-destroot.

See: #72021

comment:9 in reply to:  6 Changed 12 months ago by barracuda156

Replying to tramir:

Will there be an official fix? Or can you provide some instructions for how to proceed? I tried removing $(LDFLAGS.rpath) from the file Makefile.in in the build directory, but was not able to get past the error (port upgrade failed even after a successful ./configure). Thanks!

That was all I needed to fix the build, but anyway, Ryan’s solution should be better.

Note: See TracTickets for help on using tickets.