Opened 7 years ago

Closed 7 years ago

#56077 closed defect (fixed)

physfs @3.0.1: expected method to read array element not found on object of type 'NSArray *'

Reported by: iefdev (Eric F) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: tiger leopard snowleopard lion haspatch Cc: ryandesign (Ryan Carsten Schmidt)
Port: physfs

Description

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/physfs-3.0.1/src/physfs_platform_apple.m:53:39: error: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/physfs-3.0.1/src/physfs_platform_apple.m:53exp:39ec:t eerror: de xmpeetchtoedd  tmoe trheoadd  taor rraeya de laermreanyt  enloetm efnotu nndo to nf ooubnjde cotn  oofb jteycpte o f' NtSyAprer a'NSArrayy  **''
:info:build         NSString *path = (NSString *) paths[0];
:info:build                                       ^
:info:build         NSString *path = (NSString *) paths[0];
:info:build                                       ^
:info:build 1 error generated.
:info:build 1 error generated.
:info:build make[2]: *** [CMakeFiles/physfs-static.dir/src/physfs_platform_apple.m.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/build'
:info:build make[2]: *** [CMakeFiles/physfs.dir/src/physfs_platform_apple.m.o] Error 1
:info:build make[1]: make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/build'
:info:build *** [CMakeFiles/physfs-static.dir/all] Error 2
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: *** [CMakeFiles/physfs.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_physfs/physfs/work/build" && /usr/bin/make -j5 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build physfs: command execution failed

Attachments (2)

physfs_main.log (45.1 KB) - added by iEFdev 7 years ago.
patch-physfs-objectatindex.diff (623 bytes) - added by kencu (Ken) 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by iEFdev

Attachment: physfs_main.log added

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

This particular error happens on 10.6.8 as well. There are workarounds for this on the web that I have applied to other ports who use this incantation. Just have to see if I can remember which port that was now :>

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

Cc: ryandesign added
Keywords: tiger leopard snowleopard lion added
Summary: Failed to build physfs: command execution failedphysfs @3.0.1: expected method to read array element not found on object of type 'NSArray *'

Your log is hard to read because of interleaved errors due to parallel building.

Here's the log from the buildbot for 10.7:

https://build.macports.org/builders/ports-10.7_x86_64_legacy-builder/builds/60620/steps/install-port/logs/stdio

The error is:

error: expected method to read array element not found on object of type 'NSArray *'
        NSString *path = (NSString *) paths[0];
                                      ^
1 error generated.

According to Stack Overflow, this needs the 10.8 SDK or later. That is easy to fix on 10.7 where Xcode includes the 10.8 SDK, and harder to fix on 10.6 and earlier where Xcode does not, though I am working on a solution.

Here's the log from the buildbot for 10.6:

https://build.macports.org/builders/ports-10.6_i386_legacy-builder/builds/38548/steps/install-port/logs/stdio

That might be a different error.

comment:3 in reply to:  2 Changed 7 years ago by iEFdev

Replying to ryandesign:

Your log is hard to read because of interleaved errors due to parallel building.

Here's the log from the buildbot for 10.7: ...

Yes, the log is the one that is linked to in the terminal after the error.

Thanks for looking into it.

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

IIRC, the fix for older ObjC is to change this:

NSString *path = (NSString *) paths[0];

to this:

NSString *path = (NSString *) [paths objectAtIndex:0];
Last edited 7 years ago by kencu (Ken) (previous) (diff)

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

Yeah, looks like that fixes it, at least on 10.7.5:

$ port -v installed physfs
The following ports are currently installed:
  physfs @3.0.1_0 (active) platform='darwin 11' archs='x86_64' date='2018-03-20T11:17:42-0600'

Changed 7 years ago by kencu (Ken)

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

Keywords: haspatch added

Thanks, I reported the problem and your fix to the developers:

http://icculus.org/pipermail/physfs/2018-March/001255.html

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 80bef54d9bbc16a23f178f3977f271ba6020a34c/macports-ports:

physfs: Fix build with OS X 10.7's old clang

Closes: #56077

Note: See TracTickets for help on using tickets.