-
Notifications
You must be signed in to change notification settings - Fork 80
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
pljava build from source failing on Mac m1 - can't link with a main executable file for architecture arm64 #411
Comments
Is it resolved ? I got similar kind of issue with error such as
I have arm64 system architecture. It's failing on project pljava-so |
This issue, along with #428, seems to relate to the Mac OS compiler and linker ending up with some objects built for This may be a matter of not getting the right options to the compiler or linker during the build. In It may be that the "Mac OS X" configuration needs to be either adjusted to use the right command options on both I do not have ready access to an |
Hello,
I've postgres 11 installed on my system. When building pljava using command mvn clean install, it is failing at step PL/Java backend native code with the following error.
I'm very new to pljava. Any help would be really appreciated.
java version - 11
postgres version -11
apache maven - 3.8.6
installed llvm package via Homebrew
Error Log:
`[INFO] Using compiling/linking rules for Mac OS X
ld: warning: directory not found for option '-L/opt/local/Current/lib'
ld: warning: directory not found for option '-L/opt/local/libexec/llvm-6.0/lib'
ld: warning: directory not found for option '-L/opt/local/libexec/llvm-6.0/lib'
ld: warning: directory not found for option '-L/opt/local/20180529/lib'
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/BigDecimal.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Time.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Composite.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Relation.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/PgSavepoint.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Portal.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Short.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/ErrorData.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Oid.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Invocation.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ld: warning:
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Type.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/TypeOid.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/TupleTable.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Backend.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SQLXMLImpl.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/HashMap.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Date.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/TriggerData.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Float.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SQLOutputToChunk.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Long.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SQLInputFromChunk.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/XactListener.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning:
ld: warning:
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Void.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Session.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Coerce.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/PgObject.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Boolean.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/ExecutionPlan.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Double.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SingleRowReader.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Tuple.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/VarlenaWrapper.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/TupleDesc.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/AclId.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SPI.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SubXactListener.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Exception.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Iterator.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Integer.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/UDT.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Timestamp.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Array.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Any.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/InstallHelper.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Byte.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/DualState.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/Function.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/JNICalls.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/String.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SQLOutputToTuple.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/SQLInputFromTuple.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/Tech/pljava/pljava-so/target/pljava-pgxs/byte_array.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: can't link with a main executable file '/Library/PostgreSQL/11/bin/postgres' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for PostgreSQL PL/Java 2-SNAPSHOT:
[INFO]
[INFO] PostgreSQL PL/Java ................................. SUCCESS [ 0.521 s]
[INFO] PL/Java API ........................................ SUCCESS [ 1.995 s]
[INFO] PL/Java backend Java code .......................... SUCCESS [ 1.724 s]
[INFO] PL/Java PGXS ....................................... SUCCESS [ 1.674 s]
[INFO] PL/Java backend native code ........................ FAILURE [ 3.036 s]
[INFO] PL/Java Ant tasks .................................. SKIPPED
[INFO] PL/Java examples ................................... SKIPPED
[INFO] PL/Java packaging .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.009 s
[INFO] Finished at: 2022-09-27T19:50:39+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.postgresql:pljava-pgxs:2-SNAPSHOT:scripted-goal (build-shared-object) on project pljava-so: Linking failed with exit code: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.postgresql:pljava-pgxs:2-SNAPSHOT:scripted-goal (build-shared-object) on project pljava-so: Linking failed with exit code: 1`
The text was updated successfully, but these errors were encountered: