[MacPorts] #40082: certsync: build fails
#40082: certsync: build fails --------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Keywords: | Port: certsync --------------------------+----------------------- Building certsync fails on Leopard PowerPC: {{{ :notice:build ---> Building certsync :debug:build Executing org.macports.build (certsync) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m: In function ‘PLCFAutorelease’: :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:60: error: nested functions are disabled, use -fnested-functions to re-enable :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pred’ :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:60: error: ‘pred’ undeclared (first use in this function) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:60: error: (Each undeclared identifier is reported only once :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:60: error: for each function it appears in.) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:61: warning: implicit declaration of function ‘dispatch_once’ :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:61: error: expected expression before ‘^’ token :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m: In function ‘certificatesForTrustDomain’: :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:121: error: ‘errSecSuccess’ undeclared (first use in this function) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m: In function ‘exportCertificates’: :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:228: error: ‘SecCertificateCopyShortDescription’ undeclared (first use in this function) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:229: warning: implicit declaration of function ‘SecCertificateCopyShortDescription’ :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:229: warning: passing argument 1 of ‘PLCFAutorelease’ makes pointer from integer without a cast :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:231: warning: implicit declaration of function ‘SecCertificateCopySubjectSummary’ :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:231: warning: passing argument 1 of ‘PLCFAutorelease’ makes pointer from integer without a cast :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:254: error: ‘SecItemExport’ undeclared (first use in this function) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:255: warning: implicit declaration of function ‘SecItemExport’ :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:264: error: ‘errSecSuccess’ undeclared (first use in this function) :info:build /Volumes/Data/macports/dports/security/certsync/files/certsync.m:274: error: ‘NSDataWritingAtomic’ undeclared (first use in this function) :info:build Command failed: /usr/bin/gcc-4.2 -Os -mmacosx-version- min=10.6 -Wall /Volumes/Data/macports/dports/security/certsync/files/certsync.m -o /Volumes/Data/macports/leopard/var/macports/build/_Volumes_Data_macports_dports_security_certsync/certsync/work/certsync-1.0.3/certsync -L/Volumes/Data/macports/leopard/lib -Wl,-headerpad_max_install_names -arch ppc -framework Foundation -framework Security -framework CoreServices :info:build Exit code: 1 }}} -- Ticket URL: <https://trac.macports.org/ticket/40082> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by landonf@…): Is 10.6 still officially supported? I can probably get this working if I get a 10.6 VM running, but it won't be pretty. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by landonf@…): Just looked at this more closely; the code that's triggering the error is guarded by: #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6 This shouldn't be triggering on 10.6 at all. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by ryandesign@…): Leopard is 10.5, not 10.6. Leopard is the last OS that runs on PowerPC Macs. I still try to make my ports work on Leopard and Tiger. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by landonf@…): Sorry, the marketing names all mushed together in my head once they started re-using them with cat prefixes. I just committed a fix for PLCFAutorelease() in r109343; that part *should* now work on 10.5. SecCertificateCopyShortDescription() is still a question mark, as that code *is* guarded by a MAC_OS_X_VERSION_MAX_ALLOWED check for the SDK version. I don't have anything capable of running 10.5 even if I had a copy, so I'm flying a bit blind here, but I don't think there's anything that should prevent its working. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by dluke@…): Still fails: {{{ DEBUG: Executing org.macports.build (certsync) /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m: In function ‘certificatesForTrustDomain’: /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:113: error: ‘errSecSuccess’ undeclared (first use in this function) /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:113: error: (Each undeclared identifier is reported only once /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:113: error: for each function it appears in.) /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m: In function ‘exportCertificates’: /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:220: error: ‘SecCertificateCopyShortDescription’ undeclared (first use in this function) /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:221: warning: implicit declaration of function ‘SecCertificateCopyShortDescription’ /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:221: warning: passing argument 1 of ‘PLCFAutorelease’ makes pointer from integer without a cast /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:223: warning: implicit declaration of function ‘SecCertificateCopySubjectSummary’ /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:223: warning: passing argument 1 of ‘PLCFAutorelease’ makes pointer from integer without a cast /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:246: error: ‘SecItemExport’ undeclared (first use in this function) /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:247: warning: implicit declaration of function ‘SecItemExport’ /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:256: error: ‘errSecSuccess’ undeclared (first use in this function) /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m:266: error: ‘NSDataWritingAtomic’ undeclared (first use in this function) Command failed: /usr/bin/gcc-4.2 -Os -mmacosx-version-min=10.6 -Wall /opt/local/var/macports/sources/rsync.macports.org/release/ports/security/certsync/files/certsync.m -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_certsync/certsync/work/certsync-1.0.4/certsync -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -framework Foundation -framework Security -framework CoreServices Exit code: 1 }}} -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by landonf@…): The additional failures are still expected, I just don't know how to fix them without a 10.5 machine handy. The SecCertificateCopyShortDescription call, for example, is guarded via MAC_OS_X_VERSION_MAX_ALLOWED. If you could take a peek to figure out why that's working on 10.6 or 10.5, might be able to fix that too. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by dluke@…): yeah, I've almost got it to build with stupid hacks. I don't have a 10.6 machine to test on, but I do have 10.5/ppc around. I don't think MAC_OS_X_VERSION_10_6 is defined when building on 10.5, though. I'll post something here once I get it to build (or if I give up ;-) ). -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails ---------------------------+----------------------- Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: Port: certsync | ---------------------------+----------------------- Comment (by dluke@…): attached patch that builds and appears to run OK on 10.5 * #define errSecSuccess * #if 0 instead of trying to use Availability Macros * SecCertificateCopySubjectSummary isn't on 10.5, use SecCertificateCopyCommonName instead and ignore the fact that some certs don't have a Common Name set * alternate NSData method (writeToFile:options:error not available on 10.5 -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Changes (by ryandesign@…): * keywords: => leopard tiger haspatch Comment: It does build on Leopard with that patch; thanks. I still see "-mmacosx- version-min=10.6" in the build phase and am not sure what effect that has. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Comment (by ryandesign@…): Replying to [comment:9 dluke@…]:
I don't think MAC_OS_X_VERSION_10_6 is defined when building on 10.5, though.
I believe that's correct. You cannot use the constant MAC_OS_X_VERSION_10_''Y'' if you are running on OS X version 10.''Z'' if ''Y'' > ''Z''. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Comment (by landonf@…): Replying to [comment:10 dluke@…]:
attached patch that builds and appears to run OK on 10.5
* #define errSecSuccess * #if 0 instead of trying to use Availability Macros * SecCertificateCopySubjectSummary isn't on 10.5, use SecCertificateCopyCommonName instead and ignore the fact that some certs don't have a Common Name set * alternate NSData method (writeToFile:options:error not available on 10.5
I made a go of incorporating these changes in certsync 1.0.5, with some minor tweaks. They build+run on my 10.8 system; can you test them out on 10.5 when you get a chance? Thanks! -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Comment (by dluke@…): If I change -mmacosx-version-min=10.6 to -mmacosx-version-min=10.5 in the Portfile, then it builds and runs OK. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Comment (by landonf@…): Replying to [comment:14 dluke@…]:
If I change -mmacosx-version-min=10.6 to -mmacosx-version-min=10.5 in the Portfile, then it builds and runs OK.
Awesome, thanks! I knew I was forgetting something, fixed in r109460. I think this might actually run as far back as 10.2, but I'm guessing nobody has that around to test. -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Comment (by egall@…): Replying to [comment:15 landonf@…]:
Replying to [comment:14 dluke@…]:
If I change -mmacosx-version-min=10.6 to -mmacosx-version-min=10.5 in the Portfile, then it builds and runs OK.
Awesome, thanks! I knew I was forgetting something, fixed in r109460. I think this might actually run as far back as 10.2, but I'm guessing nobody has that around to test.
I have 10.3 around still... It's been a while since I've used that computer though... -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#40082: certsync: build fails on Leopard and Tiger ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: landonf@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.0 Resolution: fixed | Keywords: leopard tiger haspatch Port: certsync | ---------------------------+------------------------------------ Changes (by landonf@…): * status: new => closed * resolution: => fixed -- Ticket URL: <https://trac.macports.org/ticket/40082#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts