Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#53421 closed defect (fixed)

port selfupdate failed for Version 2.4.0 on 10.4.11 Tiger

Reported by: feilipu (Phillip Stevens) Owned by:
Priority: Normal Milestone: MacPorts 2.4.1
Component: base Version: 2.4.0
Keywords: tiger Cc: ryandesign (Ryan Carsten Schmidt), ballapete (Peter "Pete" Dyballa)
Port:

Description

port selfupdate failed for Version 2.4.0 on 10.4.11 Tiger

Final two files from failing build below.

Also, v2.4.0 download is not available for 10.4 Tiger https://github.com/macports/macports-base/releases/tag/v2.4.0 File missing from release downloads: MacPorts-2.4.0-10.4-Tiger.pkg

MacPorts base version 2.3.5 installed,
MacPorts base version 2.4.0 downloaded.

===> making all in src/pextlib1.0
/usr/bin/cc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -std=c99 -Wextra -Wall -pedantic     -DHAVE_CONFIG_H -I/opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base/src -I/opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base/src -I. -I/opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base/vendor/vendor-destroot//opt/local/libexec/macports/include -fno-common Pextlib.c -o Pextlib.o
Pextlib.c: In function ‘ui_message’:
Pextlib.c:115: warning: implicit declaration of function ‘vasprintf’
Pextlib.c:119: warning: implicit declaration of function ‘asprintf’
Pextlib.c: In function ‘UmaskCmd’:
Pextlib.c:318: warning: implicit declaration of function ‘setmode’
Pextlib.c:318: warning: assignment makes pointer from integer without a cast
Pextlib.c:323: warning: implicit declaration of function ‘getmode’
/usr/bin/cc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -std=c99 -Wextra -Wall -pedantic     -DHAVE_CONFIG_H -I/opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base/src -I/opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base/src -I. -I/opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base/vendor/vendor-destroot//opt/local/libexec/macports/include -fno-common adv-flock.c -o adv-flock.o
adv-flock.c: In function ‘AdvFlockCmd’:
adv-flock.c:139: error: ‘LOCK_SH’ undeclared (first use in this function)
adv-flock.c:139: error: (Each undeclared identifier is reported only once
adv-flock.c:139: error: for each function it appears in.)
adv-flock.c:143: error: ‘LOCK_EX’ undeclared (first use in this function)
adv-flock.c:147: error: ‘LOCK_UN’ undeclared (first use in this function)
adv-flock.c:151: error: ‘LOCK_NB’ undeclared (first use in this function)
adv-flock.c:154: warning: implicit declaration of function ‘flock’
make[2]: *** [adv-flock.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
Command failed: cd /opt/local/var/macports/sources/sea.us.rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc OBJC=/usr/bin/cc ./configure --prefix='/opt/local' --with-install-user='root' --with-install-group='admin' --with-directory-mode='0755' --enable-readline && make SELFUPDATING=1 && make install SELFUPDATING=1
Exit code: 2
Error: Error installing new MacPorts base: command execution failed
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

Change History (25)

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

Component: portsbase
Keywords: tiger added
Version: 2.4.0

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

Previously reported in #43245.

comment:3 Changed 7 years ago by kencu (Ken)

This is going to be another example of the #ifndef _POSIX_C_SOURCE guard issue on 10.4, I think. In 10.5 and above, the guard was like this #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE), and _DARWIN_C_SOURCE is defined on DARWIN and so enables the block in the included file.

The usual workaround that I've used elsewhere (libassuan, etc) is to undefine _POSIX_C_SOURCE, include the file, and then redefine it afterwards.

comment:4 Changed 7 years ago by jmroot (Joshua Root)

In 70a2ae0/macports-base:

Attempt to fix build on Tiger

See: #53421

comment:5 Changed 7 years ago by jmroot (Joshua Root)

Cc: ryandesign added

Someone with Tiger, please try building master.

comment:6 Changed 7 years ago by kencu (Ken)

thanks - those fixes move the build along. A new error then arises (10.4 PPC):

===> making all in src/pextlib1.0
cc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -std=c99 -Wextra -Wall -pedantic  -I/opt/bootstrap/include   -DHAVE_CONFIG_H -I/Users/cunningh/Desktop/MacPorts-2.4.0/src -I/Users/cunningh/Desktop/MacPorts-2.4.0/src -I. -I/Users/cunningh/Desktop/MacPorts-2.4.0/vendor/vendor-destroot//opt/local/libexec/macports/include -fno-common sip_copy_proc.c -o sip_copy_proc.o
In file included from sip_copy_proc.c:49:
sip_copy_proc.h:34:19: error: spawn.h: No such file or directory
In file included from sip_copy_proc.c:49:
sip_copy_proc.h:56: warning: type defaults to 'int' in declaration of 'posix_spawn_file_actions_t'
sip_copy_proc.h:56: error: parse error before '*' token
sip_copy_proc.c:477: warning: type defaults to 'int' in declaration of 'posix_spawn_file_actions_t'
sip_copy_proc.c:477: error: parse error before '*' token
sip_copy_proc.c: In function 'sip_copy_posix_spawn':
sip_copy_proc.c:484: error: 'path' undeclared (first use in this function)
sip_copy_proc.c:484: error: (Each undeclared identifier is reported only once
sip_copy_proc.c:484: error: for each function it appears in.)
sip_copy_proc.c:484: error: 'argv' undeclared (first use in this function)
sip_copy_proc.c:484: error: 'envp' undeclared (first use in this function)
sip_copy_proc.c:490: warning: implicit declaration of function 'posix_spawn'
sip_copy_proc.c:490: error: 'pid' undeclared (first use in this function)
sip_copy_proc.c:490: error: 'file_actions' undeclared (first use in this function)
sip_copy_proc.c:490: error: 'attrp' undeclared (first use in this function)
make[2]: *** [sip_copy_proc.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

will see if I can dig in.

If you need/want direct access to this machine, just ask and I'll make it available to you via ssh. -- Ken

comment:7 Changed 7 years ago by kencu (Ken)

looks like 10.4 doesn't have /usr/include/spawn.h or as far as I can see, any posix_spawn functions available.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:8 Changed 7 years ago by jmroot (Joshua Root)

In f267929/macports-base:

More attempted Tiger build fixes

See: #53421

comment:9 Changed 7 years ago by jmroot (Joshua Root)

Cc: ballapete added

comment:10 Changed 7 years ago by kencu (Ken)

that last fix seems to have allowed base to build through to completion on 10.4 PPC -- thanks. I had a hiccup when upgrading the previous 2.3.5 installation

sqlite error: near "EXISTS": syntax error (1) while executing query: DROP INDEX IF EXISTS registry.file_binary
     while executing
"registry::open $db_path"
     (procedure "mportinit" line 633)
     invoked from within
"mportinit ui_options"
     (file "./src/images_to_archives.tcl line 16)
make: *** [install] Error 1

This could be my fault, perhaps -- I have an older installation that's been upgraded a time or two there. Perhaps I'll try a fresh installation and see if that fixes it.

There were also a few warnings that went by during the base build that I might need to dig into.

comment:11 Changed 7 years ago by kencu (Ken)

I moved the old /opt/local out of the way, and macports 2.4.99 installed into /opt/local without trouble. It's a withering two weeks to rebuild everything from source on PPC Tiger, so I'm going to see if there is some way around that -- perhaps I can use my prebuilt binaries from the last installation -- but it looks like macports installs and works on Tiger now. Great job. Thanks.

comment:12 Changed 7 years ago by jmroot (Joshua Root)

Not being able to upgrade an older registry is still a bug. I assume the version of sqlite that ships with Tiger doesn't support that syntax.

comment:13 Changed 7 years ago by jmroot (Joshua Root)

Yep, support for IF EXISTS in that context was added in 3.3.0. Tiger ships 3.1.3.

comment:14 Changed 7 years ago by kencu (Ken)

can you think of a workaround? I have a second macports installation in /opt/bootstrap. I could install a newer version of sqlite in there and use it?...

comment:15 Changed 7 years ago by kencu (Ken)

interestingly, on that 10.4 PPC Tiger install, I do have /opt/local/bin/sqlite3 installed, which is at version

$ port -v installed sqlite3
The following ports are currently installed:
  sqlite3 @3.15.1_0 platform='darwin 8' archs='ppc'
  sqlite3 @3.15.1_1 platform='darwin 8' archs='ppc'
  sqlite3 @3.15.2_2 (active) platform='darwin 8' archs='ppc'
$ sqlite3 --version
3.15.2 2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8

So I guess I could have macports reference that one -- a little M.C. Escher-ian but would probably work.

comment:16 Changed 7 years ago by feilipu (Phillip Stevens)

As of now (7 Feb), I've tried to port -d selfupdate again, but the build fails with the same failure message as the initial bug log.

If the only way forward is to delete and build from clean start, is that the only current option?

comment:17 Changed 7 years ago by jmroot (Joshua Root)

A new version of MacPorts has not been released yet, so selfupdate will still build 2.4.0, which does not work on Tiger. I would not recommend the "delete and build from clean start" approach. Until MacPorts 2.4.1 is released, you can stay on 2.3.5 and sync instead of selfupdate.

comment:18 Changed 7 years ago by kencu (Ken)

Ah, I was feeling clever -- I installed a current sqlite3 in /opt/bootstrap, and then made a symlink for /usr/bin/sqlite3 to point to the new one in /opt/bootstrap/bin/sqlite3.

However, that didn't work. On macports upgrade, the same IF EXISTS error occurred. sqlite3 must be called some other way than through that binary, it seems.

comment:19 Changed 7 years ago by kencu (Ken)

I found it.

--with-sqlite3prefix

so on Tiger, I already need to install a bootstrap version into /opt/bootstrap, then install curl in there. Now I also need to install sqlite3 in there. Then build macports from source, using

./configure --with-curlprefix=/opt/bootstrap --with-sqlite3prefix=/opt/bootstrap

with that process you get a modern curl (fixing all the download problems on older systems) and a current sqlite3 (fixing the upgrade issues)

admittedly, it's a couple of steps. But it should work..

update -- I thought that would work -- but it didn't find sqlite3 correctly with that line. Working on it...

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:20 Changed 7 years ago by jmroot (Joshua Root)

In fcdbfd4/macports-base:

Avoid Tiger-incompatible SQL syntax

The index should always exist, so just leaving out IF EXISTS is probably OK.

See: #53421

comment:21 Changed 7 years ago by kencu (Ken)

Yeah- that's got it. Install from source (using --with-curlprefix=/opt/bootstrap for me, to get all the downloads working) went smoothly on 10.4 PPC, and the registry upgrade also proceeded without error.

still not certain why the --with-sqlite3prefix thing didn't work for me, but doesn't really matter any more.

Good to go, it seems. Someone else want to try?

thanks. -- Ken

comment:22 Changed 7 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.4.1
Resolution: fixed
Status: newclosed

Closing based on Ken's report. If we could get confirmation from a second person that would be great.

comment:23 Changed 7 years ago by gungwald (Bill Chatfield)

I would like to confirm the fix as I have 10.4.11 and have been trying to update for a while. But, I'm not clear on exactly what the fix is. Can someone clarify exactly what command I need to run? There seem to be several fixes going on in this thread and I'm not sure which ones to apply. Right now I'm trying to run: sudo port -v selfupdate

Thanks.

comment:24 Changed 7 years ago by kencu (Ken)

Bill -- you need to download the latest sources for macports base <https://github.com/macports/macports-base> onto the Tiger machine, and then install as if from source. You might need to download them with another machine, and move the ZIP file over, depending on the status of your Tiger machine. To install from source, in easy cases, that means going into the folder, and running configure, make, and sudo make install for default installations.

You will wind up with a macports that has old libcurl security, and won't be able to download from many sites. That's why I do to custom install using an updated libcurl to fix this issue, as above.

Let me / us know if you have trouble, or get stuck. -- Best, K

comment:25 Changed 7 years ago by ballapete (Peter "Pete" Dyballa)

The update to version 2.4.1 worked last night on PPC Tiger, Mac OS X 10.4.11.

Note: See TracTickets for help on using tickets.