Opened 6 years ago

Closed 6 years ago

Last modified 2 years ago

#56895 closed defect (fixed)

aquaterm @1.1.1 build fails with Xcode 10.0 (b5) on Mojave beta5

Reported by: AP1010 Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: mojave Cc: mojca (Mojca Miklavec), rshuston
Port: aquaterm

Description

Not sure what is going on. I see a number of messages like this: IDELogStore: Failed to open log store at /opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Test

Attachments (3)

main.log (25.5 KB) - added by AP1010 6 years ago.
log file of the failed build
patch-aquaterm-no-dup-help-html-copy.diff (2.0 KB) - added by kencu (Ken) 6 years ago.
main.2.log (324.4 KB) - added by AP1010 6 years ago.
main.log Build successful; install failed

Download all attachments as: .zip

Change History (28)

Changed 6 years ago by AP1010

Attachment: main.log added

log file of the failed build

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

Cc: mojca added; mojca@… removed
Owner: set to g5pw
Port: @1.1.1 removed
Status: newassigned

I don't know which of the errors in the log is the real one to pay attention to, but I do know you should not be disclosing information about prerelease Apple software publicly; see wiki:FAQ#prerelease.

comment:2 Changed 6 years ago by rshuston

I think it's safe to attend to this problem. Xcode 10 is out as of today. The data in the log file, or at least the snippet I'm posting, is not violating any NDA; the only thing that's specific to Mojave is the version of the SDK, which of course is 10.14 ... no big secret there.

This is what happens to me running Xcode 10 GM with its associated command line tools:

...
:info:build Build system information
:info:build error: Multiple commands produce '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.app/Contents/Resources/help.html':
:info:build 1) Target 'AquaTerm' (project 'AquaTerm') has copy command from '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/Help/help.html' to '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.app/Contents/Resources/help.html'
:info:build 2) Target 'AquaTerm' (project 'AquaTerm') has copy command from '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/Help/help.html' to '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.app/Contents/Resources/help.html'
:info:build ** BUILD FAILED **
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm" && /usr/bin/xcodebuild  -target "AquaTerm" -configuration Default build  OBJROOT=build/ SYMROOT=build/ MACOSX_DEPLOYMENT_TARGET=10.14 ARCHS=x86_64 SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY="libc++" LOCAL_APPS_DIR=/Applications/MacPorts LOCAL_FRAMEWORKS_DIR=/opt/local/Library/Frameworks
:info:build Exit code: 65
...

I'm in the process of reinstalling Octave under Mojave, which brings in AquaTerm. I know it usually takes maintainers some time to catch their ports up with a new version of macOS, but in this case, we're already aware of a problem. In particular, it appears that ":info:build error: Multiple commands produce ..." is telling us something.

Cheers, and thanks!

comment:3 Changed 6 years ago by AP1010

It looks like there are at least two separate issues: 1: "error: Multiple commands produce ..... " This, I believe, used to be a warning in Xcode 9. Now it is an error. I did the following experiment:

>port configure aquaterm

then manually edited AquaTerm.xcodeproj file to remove the duplicate. After this I ran:

>port -v build aquaterm 

I got : " BUILD SUCCEEDED "

so, then I tried:

>port -v install aquaterm  

... which unfortunately failed

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

try adding this patch. I'm not running Mojave yet, but it seems to do the right thing.

(put it in the files directory in the aquaterm port directory, and add it to the list of patchfiles in the Portfile)

Changed 6 years ago by kencu (Ken)

Changed 6 years ago by AP1010

Attachment: main.2.log added

main.log Build successful; install failed

comment:5 Changed 6 years ago by AP1010

The patch fixes first part of the problem. Build now works. Install still fails.

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

This:

1193    :info:destroot SymLink /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot/opt/local/Library/Frameworks/AquaTerm.framework (in target: AQTFwk)
1194	:info:destroot     cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm
1195	:info:destroot     /bin/ln -sfh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot/opt/local/Library/Frameworks/AquaTerm.framework /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework
1196	:info:destroot error: unable to create symlink at '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework'

Dunno. Might have to look in that directory and see what's going on when you run that command (1194 then 1195) manually.

Permissions problem? Perhaps connected to 57137 ?

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

comment:7 Changed 6 years ago by AP1010

When I run 1195 manually, it seems to work. No errors. Permisions on dest. directory look OK:

ls -al /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework
total 0
drwxr-xr-x  2 macports  admin   64 17 Sep 20:48 .
drwxr-xr-x  4 macports  admin  128 17 Sep 20:48 ..

After executing 1195, the directory looks like this:

ls -al /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework
total 0
drwxr-xr-x  3 macports  admin   96 17 Sep 20:52 .
drwxr-xr-x  4 macports  admin  128 17 Sep 20:48 ..
lrwxr-xr-x  1 root      admin  197 17 Sep 20:52 AquaTerm.framework -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot/opt/local/Library/Frameworks/AquaTerm.framework

Obviously I ran the command as root, while script runs as macports. Not sure what difference this makes.

comment:8 Changed 6 years ago by AP1010

I re-ran it as macports. Still works. I get:

ls -al /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework
total 0
drwxr-xr-x  3 macports  admin   96 17 Sep 21:08 .
drwxr-xr-x  4 macports  admin  128 17 Sep 21:07 ..
lrwxr-xr-x  1 macports  admin  197 17 Sep 21:08 AquaTerm.framework -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot/opt/local/Library/Frameworks/AquaTerm.framework

No idea.

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

there is a set of "asroot" options in MacPorts to force the big root permissions during a MacPorts phase.

Not ideal, granted, but perhaps it might get things at least sorted out as to what kind of problem it is.

build.asroot
destroot.asroot
install.asroot

etc.

comment:10 Changed 6 years ago by AP1010

I will test asroot later today and report.

comment:11 Changed 6 years ago by AP1010

I tried placing all three in the Portfile:

build.asroot            yes
destroot.asroot         yes
install.asroot          yes

The end result was the same.

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

Sadly out of ideas for now. We'll have to wait for one of the smart guys to chime in...

comment:13 Changed 6 years ago by rshuston

Cc: rshuston added

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

I tried again, with Xcode 10 on 10.13.

First error I ran into was 57137, which was solved with this:

build.pre_args      -derivedDataPath ./DerivedData
xcode.scheme        AquaTerm

Then I ran into the "help.html" error, which was solved with the patch above.

Then I got the original error noted in this ticket up at the top:

2018-09-20 12:12:53.112 xcodebuild[14085:76908] [MT] IDELogStore: Failed to open log store at /var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Build
2018-09-20 12:12:53.112 xcodebuild[14085:76908] [MT] IDELogStore: Failed to open Build log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Build': (513) You don\U2019t have permission to save the file \U201cBuild\U201d in the folder \U201cLogs\U201d.";
}.
2018-09-20 12:12:53.136 xcodebuild[14085:76908] [MT] IDELogStore: Failed to open log store at /var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Test
2018-09-20 12:12:53.136 xcodebuild[14085:76908] [MT] IDELogStore: Failed to open Test log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Test': (513) You don’t have permission to save the file “Test” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Test': (513) You don’t have permission to save the file “Test” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn/Logs/Test': (513) You don\U2019t have permission to save the file \U201cTest\U201d in the folder \U201cLogs\U201d.";
}.
Build Preparation
Couldn't create workspace arena folder '/var/root/Library/Developer/Xcode/DerivedData/AquaTerm-decozxvzmhimszaplywgfeluynzn': You don’t have permission to save the file “AquaTerm-decozxvzmhimszaplywgfeluynzn” in the folder “DerivedData”.

which looks like another variation on the derived datapath error, but for the destrooting. So that error was solved with this addition:

destroot.pre_args      -derivedDataPath ./DerivedData

That then gets through to the SymLink error:

The following build commands failed:
	SymLink /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot/opt/local/Library/Frameworks/AquaTerm.framework
(1 failure)
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm" && /usr/bin/xcodebuild -derivedDataPath ./DerivedData  -scheme "AquaTerm" -configuration Default install   OBJROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/" SYMROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/" MACOSX_DEPLOYMENT_TARGET=10.13 ARCHS=x86_64 SDKROOT="" GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY="libc++" LOCAL_APPS_DIR=/Applications/MacPorts LOCAL_FRAMEWORKS_DIR=/opt/local/Library/Frameworks DSTROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot"
Exit code: 65

Funny thing is, that SymLink command fails, but it looks like the Framework is already there:

$ cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default

$ ls -la
total 0
drwxr-xr-x  4 macports  wheel  128 20 Sep 12:18 .
drwxr-xr-x@ 5 macports  wheel  160 20 Sep 12:18 ..
drwxr-xr-x  2 macports  wheel   64 20 Sep 12:18 AquaTerm.app
drwxr-xr-x  2 macports  wheel   64 20 Sep 12:18 AquaTerm.framework
$ cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/destroot/opt/local/Library/Frameworks
$ ls -la
total 0
drwxr-xr-x  3 root  wheel   96 20 Sep 12:18 .
drwxr-xr-x  3 root  wheel   96 20 Sep 12:18 ..
drwxr-xr-x  6 root  wheel  192 20 Sep 12:18 AquaTerm.framework

So now pondering that.

I think many of these issues will wind up being general issues with XCode (like the derivedDataPath issues above), but some are AquaTerm specific (like the double copy on help.html and probably the SymLink thing...)

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

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

So when the error happens with the SymLink step, removing what appears to be the two already-made SymLinks that error out when trying to SymLink again:

sudo rm -rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.framework
sudo rm -rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_aquaterm/aquaterm/work/AquaTerm-1.1.1/aquaterm/build/Default/AquaTerm.app

and the build succeeds without trouble:

** INSTALL SUCCEEDED **
$ sudo port -v installed aquaterm
The following ports are currently installed:
  aquaterm @1.1.1_0 (active) platform='darwin 17' archs='x86_64' date='2018-09-20T12:45:32-0700'

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

I never really understood why xcodebuild always seems to build the port, and then rebuild it AGAIN when you destroot it, so I thought that might be the source of the double-symlink. Indeed, deleting the build phase entirely with this:

build {}

and you no longer get any SymLink errors, and you don't need to delete the folders above.

In summary, this fixes AquaTerm for me here (with the extra patch above in the files folder):

patchfiles-append   patch-aquaterm-no-dup-help-html-copy.diff
build               {}
destroot.pre_args   -derivedDataPath ./DerivedData
xcode.scheme        AquaTerm
Version 0, edited 6 years ago by kencu (Ken) (next)

comment:17 Changed 6 years ago by AP1010

Your fix works for me too!. So, looks like it was strictly Xcode issue. Nothing to do with the OS version

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

I noted the exact same SymLink error building irrlicht with Xcode 10, so this is a general xcode PG thing to fix:

The following build commands failed:
	SymLink /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_irrlicht/irrlicht/work/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/Release/IrrFramework.framework /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_irrlicht/irrlicht/work/destroot/opt/local/Library/Frameworks/IrrFramework.framework
(1 failure)
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_irrlicht/irrlicht/work/irrlicht-1.8.4" && /usr/bin/xcodebuild -project "./source/Irrlicht/MacOSX/MacOSX.xcodeproj" -target "IrrFramework" -configuration Release install INSTALL_PATH=/opt/local/Library/Frameworks  OBJROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_irrlicht/irrlicht/work/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/" SYMROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_irrlicht/irrlicht/work/irrlicht-1.8.4/source/Irrlicht/MacOSX/build/" MACOSX_DEPLOYMENT_TARGET=10.13 ARCHS=x86_64 SDKROOT="" GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY="libc++"  DSTROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_irrlicht/irrlicht/work/destroot"
Exit code: 65

comment:19 Changed 6 years ago by mojca (Mojca Miklavec)

Ken, could you please submit a pull request with a fix to https://github.com/AquaTerm/AquaTerm? Other than that, feel free to simply commit the fix yourself, I didn't install the latest Xcode yet, so I cannot verify the change.

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

I can certainly submit the patch re: the duplicate help.html copy to the aquaterm repo.

The Xcode other stuff -- I think we are trying to see if we fix this port-by-port, or if we do an all-in-one fix in the Xcode PortGroup. I'm leaning towards the latter, if it plays out that way for the other ports.

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

I found a simpler fix. It's up as a PR, and if the bots build it, then we can commit.

comment:22 Changed 6 years ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In 81afc68c58d8b8107473fdcc147b97ac5d2e8411/macports-ports (master):

aquaterm: use old xcode build system on Xcode10+

closes: #56895

comment:23 Changed 6 years ago by rshuston

Thank you, everybody, for addressing this! It is very much appreciated.

comment:24 Changed 6 years ago by Christian Walther <cwalther@…>

In 27eaaca5341ce9bd4cbb08a1d111f67239ec1a7c/macports-ports (master):

graphviz-gui: fix build on Mojave

Building with Xcode 10.1 on macOS 10.14 fails with "error: Compiling
for earlier than macOS 10.6 is no longer supported". Add a patch that
raises the SystemTarget version in the xib files.

closes: #57830

The destroot step of graphviz-gui fails with the same SymLink error as
observed for aquaterm in ticket 56895. Copy the fix from there
(81afc68c58d8b8107473fdcc147b97ac5d2e8411).

see: #56895

comment:25 Changed 2 years ago by hexane360 (Colin Gilgenbach)

In 32c5c1e4a77f9a7437e74be6fb25551fd2e17e6e/macports-ports (master):

aquaterm: fix xcode build

Fixes aquaterm build. A file was specified in the bundle twice,
which newer versions of xcode seem to error out on. In the past
this was fixed using '-UseNewBuildSystem=NO' on xcode >=10, but
this fix no longer works.

Closes: #65749
References: #56895

Note: See TracTickets for help on using tickets.