Opened 6 months ago

Last modified 5 months ago

#73854 assigned defect

oracle-instantclient: automatic download of distfiles no longer possible ; outdated versions ; updated archs

Reported by: BjarneDMat Owned by: BjarneDMat
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Dave-Allured (Dave Allured)
Port: oracle-instantclient php-oracle

Description (last modified by BjarneDMat)

OK, I discovered these problems, because php-oracle fails to install, leading the GitHub Actions CI to fail all my updates to the lang/php/Portfile.

  1. Oracle has moved all downloads behind a login-wall
  2. the master_sites URL has changed
  3. the versions !really! needs to be updated
  4. there's now an arm64 version too
  5. every arch now has it's own latest version
  6. Oracle has changed the download format from .zip to .dmg for the arm64 & x86_64 arches
  7. ports that have depends_lib{,-append} port:oracle-instantclient now fail in the buildbot due to (1)
  8. post-fetch fails when master_sites is correct

regarding (6):
Can one just set extract.suffix to .dmg where required ?

regarding (8):
The issue here is, that w/ an in-correct master_sites one just get a bare 404 ; w/ a correct master_sites one gets both a 404 and some html

I've got a draft PR : ​https://github.com/macports/macports-ports/pull/32229

Change History (14)

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

The downloads have always been behind a login-wall so this is nothing new.

To use a .dmg download, set use_dmg yes.

comment:2 Changed 6 months ago by jmroot (Joshua Root)

Port: oracle-instantclient php-oracle added

It is unfortunate that this causes builds to fail every time the php Portfile is updated. I wonder if it makes sense to move php*-oracle ports to a separate Portfile, or if there's some other way to avoid the repeated mirroring and build failures.

comment:3 Changed 6 months ago by BjarneDMat

php-oracle buildbot failures :
It's a new thing - I hadn't seen it in any PR before PR31275
My work-around in PR31275 was to insert know_fail yes

There'll be a separate php-oracle port in the near future - php-oracle has been evicted from php >= 8.4 . It had just simply eluded my attention, that that was the case - My Bad ! According to ​https://pecl.php.net/package/PDO_OCI it ought to be possible to remove php-oracle entirely from lang/php/Portfile if it's the consensus, that that's the desired way to go.

comment:4 Changed 6 months ago by BjarneDMat

I've got problems w/ (3)

Updating to x86_64 @12.1.0.2.0 🤓👍🏻

Updating to x86_64 @18.1.0.0.0 or @19.16.0.0.0dbru leads to this error :

--->  Building oracle-instantclient
DEBUG: Executing org.macports.build (oracle-instantclient)
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libociei.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libociei.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libocci.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libocci.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libnnz18.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libnnz18.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libclntsh.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib
DEBUG: system: install_name_tool -add_rpath /opt/local/lib/oracle /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/liboramysql18.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/liboramysql18.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libocijdbc18.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libocijdbc18.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libocci.dylib.18.1 /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libocci.dylib.18.1
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libons.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libons.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libclntshcore.dylib.18.1 /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntshcore.dylib.18.1
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libclntsh.dylib.18.1 /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib.18.1
DEBUG: system: install_name_tool -add_rpath /opt/local/lib/oracle /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib.18.1
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: for: /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib.18.1 (for architecture x86_64) option "-add_rpath /opt/local/lib/oracle" would duplicate path, file already has LC_RPATH for: /opt/local/lib/oracle
Command failed: install_name_tool -add_rpath /opt/local/lib/oracle /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib.18.1
Exit code: 1
Error: Failed to build oracle-instantclient: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: command execution failed
    while executing
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_Users_macuser_MacPorts_ports_oracle_databases_oracle-instantclient/oracle-instantclient/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port oracle-instantclient failed

The relevant part from a x86_64 @12.1.0.2.0 install is this:

--->   Building oracle-instantclient
DEBUG: Executing org.macports.build (oracle-instantclient)
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libociei.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libociei.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libocci.dylib.12.1 /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libocci.dylib.12.1
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libons.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libons.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libclntshcore.dylib.12.1 /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntshcore.dylib.12.1
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/liboramysql12.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/liboramysql12.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libocijdbc12.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libocijdbc12.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libnnz12.dylib /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libnnz12.dylib
DEBUG: system: install_name_tool -id /opt/local/lib/oracle/libclntsh.dylib.12.1 /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib.12.1
DEBUG: system: install_name_tool -add_rpath /opt/local/lib/oracle /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build/x86_64/libclntsh.dylib.12.1
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: destroot phase started at 2026-04-15T12:05:12.292+0000 (Wed Apr 15 14:05:12 CEST 2026)

Any idea as to how I can track this 🤯 down 🙏🏻❓

The PR is updated so that one can easily switch between the 3 x86_64 versions for testing

comment:5 Changed 6 months ago by BjarneDMat

If you don't want to download the necessary files from Oracle, I can make them privately available for download - send me an 📧

comment:6 Changed 6 months ago by Dave-Allured (Dave Allured)

Updating to x86_64 @18.1.0.0.0 or @19.16.0.0.0dbru leads to this error:

This is a duplicate rpath error. The portfile contains this old code, where this error is occurring: install_name_tool -add_rpath ...

My guess is that Oracle changed or fixed their rpath code in recent versions. Try simply disabling this add_rpath section in the Portfile.

comment:7 Changed 6 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:8 Changed 6 months ago by BjarneDMat

@Dave-Allured : That fixed it 🤓👍🏻

I've now got for x86_64 @18.1.0.0.0 :

php85-oracle -> evicted 
php84-oracle -> evicted
php83-oracle @8.3.30_0 (active)
php82-oracle @8.2.30_0 (active)
php81-oracle @8.1.34_0 (active)
php80-oracle @8.0.30_0 (active)
php74-oracle error [-Wincompatible-function-pointer-types]

The PR has been updated

Last edited 6 months ago by BjarneDMat (previous) (diff)

comment:9 Changed 6 months ago by BjarneDMat

🤔 Next Problem :

extracting

--->  Extracting oracle-instantclient
DEBUG: Executing org.macports.extract (oracle-instantclient)
xinstall: mkdir /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/build
DEBUG: system: /usr/bin/hdiutil attach -private -readonly -nobrowse -mountpoint /tmp/mports.QFLww08C 
       && cd /tmp/mports.QFLww08C 
       && /usr/bin/find . -depth -perm -+r -print0 
       | /usr/bin/cpio -0 -p -d -m -u 
         /opt/local/var/macports/build/oracle-instantclient-ed349c08/work/oracle-instantclient-19.16.0.0.0dbru; 
       status=$?; 
       cd / && /usr/bin/hdiutil detach /tmp/mports.QFLww08C 
       && /bin/rmdir /tmp/mports.QFLww08C; 
       exit $status /opt/local/var/macports/distfiles/oracle-instantclient/instantclient-basic-macos.x64-19.16.0.0.0dbru.dmg
hdiutil: attach: missing image argument
Usage:	hdiutil attach [options] <image>
	hdiutil attach -help
hdiutil: detach failed - Arkiv eller bibliotek findes ikke

When I compare to other Ports that have `use_dmg´then:

--->  Extracting SDRplay_RSP_API-MacOSX-3.07.1.dmg
DEBUG: setting option extract.args to '/opt/local/var/macports/distfiles/SDRplay3/SDRplay_RSP_API-MacOSX-3.07.1.dmg'
DEBUG: elevating privileges for extract dmg: euid changed to 0, egid changed to 0.
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/SDRplay3-365195f9/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='15.0'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk'
SOURCE_DATE_EPOCH='1759962514'
Executing:  cd "/opt/local/var/macports/build/SDRplay3-365195f9/work" 
            && /usr/bin/hdiutil attach '/opt/local/var/macports/distfiles/SDRplay3/SDRplay_RSP_API-MacOSX-3.07.1.dmg' 
               -private -readonly -nobrowse -mountpoint /tmp/mports.cQpgHN9L 
            && cd /tmp/mports.cQpgHN9L && /usr/bin/find . -depth -perm -+r -print0 
            | /usr/bin/cpio -0 -p -d -m -u /opt/local/var/macports/build/SDRplay3-365195f9/work/SDRplay_RSP_API-MacOSX-3.07.1; 
            status=$?; 
            cd / && /usr/bin/hdiutil detach /tmp/mports.cQpgHN9L 
            && /bin/rmdir /tmp/mports.cQpgHN9L; 
            exit $status 
DEBUG: system:  cd "/opt/local/var/macports/build/SDRplay3-365195f9/work" 
            && /usr/bin/hdiutil attach '/opt/local/var/macports/distfiles/SDRplay3/SDRplay_RSP_API-MacOSX-3.07.1.dmg' 
            -private -readonly -nobrowse -mountpoint /tmp/mports.cQpgHN9L && cd /tmp/mports.cQpgHN9L 
            && /usr/bin/find . -depth -perm -+r -print0 
            | /usr/bin/cpio -0 -p -d -m -u /opt/local/var/macports/build/SDRplay3-365195f9/work/SDRplay_RSP_API-MacOSX-3.07.1; 
            status=$?; 
            cd / && /usr/bin/hdiutil detach /tmp/mports.cQpgHN9L && /bin/rmdir /tmp/mports.cQpgHN9L;
            exit $status 
/dev/disk15         	GUID_partition_scheme          	
/dev/disk15s1       	Apple_HFS                      	/private/tmp/mports.cQpgHN9L
2589 blocks
"disk15" ejected.

So ...

  1. it's missing the start cd
  2. the dmg isn't in the correct place after hdiutil attach

comment:10 Changed 6 months ago by Dave-Allured (Dave Allured)

Where is your current Portfile that generated this hdiutil error? The current CI results in the PR do not match this error. Are you working off line? I would review your current Portfile if I could see it.

comment:12 Changed 6 months ago by Dave-Allured (Dave Allured)

Portfile: Got it. I had misread the CI last time, my bad.

I think you need to change use_zip yes to use_dmg yes. Also, perhaps you should move this inside the ${os.arch} conditional, and use_zip for PPC, use_dmg for (not PPC). Not sure, I have not done this construction before.

comment:13 Changed 5 months ago by BjarneDMat

Description: modified (diff)
Owner: set to BjarneDMat
Status: new → assigned

comment:14 in reply to:  9 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

I am not working on this, but just to answer a few questions that have piled up:

Replying to jmroot:

It is unfortunate that this causes builds to fail every time the php Portfile is updated. I wonder if it makes sense to move php*-oracle ports to a separate Portfile, or if there's some other way to avoid the repeated mirroring and build failures.

Since we don't have a distfiles-private server or mirroring mechanism set up, I avoided build failures before by manually downloading the oracle-instantclient files on my machine, manually copying them to each buildbot worker's distfiles directory, setting their modification date in the future so they wouldn't be auto-deleted, then scheduling the oracle-instantclient builds. This would produce binaries on the packages-private server that the buildbot could use to subsequently build the php*-oracle subports.

I've taken care to do this for each new Intel buildbot worker as I set it up. There are binaries of oracle-instantclient on packages-private for all Intel macOS versions (except Tahoe and Leopard) so there should be no build failures of php*-oracle on Intel buildbot machines that are caused by missing oracle-instantclient. This is confirmed by the ​port health indicators.

If there are failures of php*-oracle on Intel CI machines, that would happen if CI did not have access to the packages-private server, which has indeed been mostly or possibly completely broken for months because I haven't updated the list of allowed CI IP addresses on the packages-private server. The long-term plan is to move packages-private to our new carola server and to allow access by VPN rather than by IP whitelisting.

On arm64, the oracle-instantclient port doesn't currently support arm64 so there is a build failure when php*-oracle can't install that dependency for arm64. The workaround for that would be to indicate the same supported_archs in the php*-oracle ports as is set in oracle-instantclient. This seems to be a general MacPorts limitation at this time: If a port restricts its supported_archs, all ports depending on it must be marked at least as restrictively.

Replying to BjarneDMat:

There'll be a separate php-oracle port in the near future - php-oracle has been evicted from php >= 8.4 . It had just simply eluded my attention, that that was the case - My Bad ! According to ​https://pecl.php.net/package/PDO_OCI it ought to be possible to remove php-oracle entirely from lang/php/Portfile if it's the consensus, that that's the desired way to go.

Looks like for php < 8.3 the new php-oracle port would have to use version 1.0 from 2005, and for php ≥ 8.3 it can use the latest version. To decrease the version like this, the epoch in the new php-oracle port will need to be increased to 3 to be greater than its current value of 2 from the php portfile.

Before moving this module to a new php-oracle port, compare the source code of the module from the 1.0 distribution with the ones included in the latest php source distriburtion to make sure there aren't any post-1.0 improvements in the php source distribution that we would be reverting by going back to the 1.0 version.

Instead of having the new php-oracle use 1.0 for php < 8.3, it could have separate cases for each version and continue to use the php source distribution for those older php versions.

Replying to BjarneDMat:

So ...

  1. it's missing the start cd
  2. the dmg isn't in the correct place after hdiutil attach

My advice to use use_dmg yes assumed the port was using a standard extract phase. I did not remember that this port overrides the extract phase, and since the port did not use dmg distfiles I did not write that override to accommodate them; use_dmg yes evidently messes it up. I haven't gone back to try to re-learn why I did that but I'm sure I had a good reason at the time. If the reason no longer applies, you can remove the extract phase override. Otherwise, you would enhance the extract phase override to handle dmg files.

Note: See TracTickets for help on using tickets.