Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CGO LDflags for new MacOS linker #10924

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

johscheuer
Copy link
Contributor

The new MacOS linker from Xcode 15 has some changes that breaks things in our current setup (e.g. golang/go#62598 + golang/go#61229). I tested this change with go 1.20.8 and Xcode 15:

$ xcodebuild -version
Xcode 15.0
Build version 15A240d

I haven't tested this with an older Xcode version.

Related forum post.: https://forums.foundationdb.org/t/golang-bindings-after-upgrading-to-xcode-15/4163/2

I opened the PR against 7.1 as my testing application uses 7.1 (and I have that library locally installed). I'm happy to open the PRs for 7.3/main once we agree that the fix is the right approach.

Before the change:

$ go test ./fdbclient/...
# github.com/FoundationDB/fdb-kubernetes-operator/fdbclient.test
ld: warning: '/private/var/folders/mh/mr__47051f18gpsd3x_synbc0000gn/T/go-link-2252000032/go.o' has malformed LC_DYSYMTAB, expected 127 undefined symbols to start at index 55097, found 133 undefined symbols starting at index 85
dyld[18768]: Symbol not found: _fdb_create_database
  Referenced from: <89D35BC1-1BFF-3E4C-A258-66C9061099C0> /private/var/folders/mh/mr__47051f18gpsd3x_synbc0000gn/T/go-build3984296838/b001/fdbclient.test
  Expected in:     <no uuid> unknown
FAIL    github.com/FoundationDB/fdb-kubernetes-operator/fdbclient       0.268s
FAIL

after the change:

$ go test -v ./fdbclient/...
# github.com/FoundationDB/fdb-kubernetes-operator/fdbclient.test
ld: warning: '/private/var/folders/mh/mr__47051f18gpsd3x_synbc0000gn/T/go-link-3824344522/go.o' has malformed LC_DYSYMTAB, expected 127 undefined symbols to start at index 55097, found 133 undefined symbols starting at index 85
=== RUN   TestCmd
Running Suite: FDB client - /Users/jscheuermann/go/src/github.com/FoundationDB/fdb-kubernetes-operator/fdbclient
================================================================================================================
Random Seed: 1695363764

Will run 59 of 59 specs
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

Ran 59 of 59 Specs in 0.020 seconds
SUCCESS! -- 59 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestCmd (0.02s)
PASS
ok      github.com/FoundationDB/fdb-kubernetes-operator/fdbclient       0.293s

In addition I build the FDB operator with this change:

$  make manager
go build -ldflags="-s -w -X github.com/FoundationDB/fdb-kubernetes-operator/setup.operatorVersion=7e2735bc92e7557c1aa8ce5d9616fb6daa1ab8ea" -o bin/manager main.go
# command-line-arguments
ld: warning: '/private/var/folders/mh/mr__47051f18gpsd3x_synbc0000gn/T/go-link-4186637257/go.o' has malformed LC_DYSYMTAB, expected 125 undefined symbols to start at index 62489, found 178 undefined symbols starting at index 93

$ /bin/manager --help
Usage of ./bin/manager:
  -cache-database-status
        Defines the default value for caching the database status. (default true)
...

Code-Reviewer Section

The general pull request guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • The PR has a description, explaining both the problem and the solution.
  • The description mentions which forms of testing were done and the testing seems reasonable.
  • Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or main if this is the youngest branch)
  • There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

@johscheuer johscheuer requested a review from jzhou77 September 22, 2023 06:24
@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: c3d4ab1
  • Duration 0:16:34
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /opt/homebrew/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: c3d4ab1
  • Duration 0:20:53
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: 7e9e5d7
  • Duration 0:16:55
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /opt/homebrew/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: 7e9e5d7
  • Duration 0:21:26
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux CentOS 7

  • Commit ID: c3d4ab1
  • Duration 0:56:00
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-clang on Linux CentOS 7

  • Commit ID: 7e9e5d7
  • Duration 0:43:01
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: c3d4ab1
  • Duration 1:14:51
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: 7e9e5d7
  • Duration 1:33:35
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: c3d4ab1
  • Duration 2:38:08
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: 7e9e5d7
  • Duration 2:31:22
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: 7e9e5d7
  • Duration 0:21:04
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login -c ./build_pr_macos.sh. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@jzhou77 jzhou77 requested a review from ammolitor September 22, 2023 22:25
@jzhou77 jzhou77 merged commit 6a737e0 into apple:release-7.1 Sep 26, 2023
@johscheuer johscheuer deleted the update-macos-cgo branch September 27, 2023 07:50
This was referenced Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants