I cannot install maven (with command) 'mvn clean install' on Mac m1 chip as it fails at step PL/Java backend native code. (full build trace below)
I tried with 11,12(failed with a similar error). However, the build is successful only with Postgres 14.
I require earlier versions of Postgres (either 11,12 or 13) for my requirement.
I'd really appreciate some help on this.
Thanks in advance.
P.S:
I've installed java 11, postgres 13, apache maven 3.8.6 , tomcat 9 on my system prior trying to build.
[INFO] --- pljava-pgxs:2-SNAPSHOT:scripted-goal (build-shared-object) # pljava-so ---
Warning: Nashorn engine is planned to be removed from a future JDK release
[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-9.0/lib'
ld: warning: directory not found for option '-L/opt/local/libexec/llvm-9.0/lib'
ld: warning: directory not found for option '-L/opt/local/20210916/lib'
ld: warning: directory not found for option '-L/opt/local/lib'
ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Type.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/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: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/ErrorData.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Oid.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/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: ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Void.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Float.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ld: warning: ld: warning: ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/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/pljava/pljava-so/target/pljava-pgxs/BigDecimal.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/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: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Invocation.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/TypeOid.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Time.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Date.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Relation.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/HashMap.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/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/pljava/pljava-so/target/pljava-pgxs/Long.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/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/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/pljava/pljava-so/target/pljava-pgxs/PgObject.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/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/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/pljava/pljava-so/target/pljava-pgxs/SingleRowReader.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Session.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/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/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/pljava/pljava-so/target/pljava-pgxs/Coerce.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/SQLOutputToChunk.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/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/pljava/pljava-so/target/pljava-pgxs/SubXactListener.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning:
ld: warning: ignoring file /Users/kishorebiradavolu/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/pljava/pljava-so/target/pljava-pgxs/TupleDesc.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/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: warning:
ld: warning: ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Double.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/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: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/DualState.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/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/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/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:
ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Timestamp.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Function.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/SPI.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/pljava/pljava-so/target/pljava-pgxs/SQLOutputToTuple.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/VarlenaWrapper.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Boolean.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/UDT.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64ld: warning: ignoring file /Users/kishorebiradavolu/pljava/pljava-so/target/pljava-pgxs/Exception.o, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /Users/kishorebiradavolu/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/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: ld: warning: ignoring file /Users/kishorebiradavolu/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/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/pljava/pljava-so/target/pljava-pgxs/SQLInputFromTuple.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/13/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.514 s]
[INFO] PL/Java API ........................................ SUCCESS [ 1.997 s]
[INFO] PL/Java backend Java code .......................... SUCCESS [ 1.640 s]
[INFO] PL/Java PGXS ....................................... SUCCESS [ 1.615 s]
[INFO] PL/Java backend native code ........................ FAILURE [ 2.972 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: 8.794 s
[INFO] Finished at: 2022-09-22T17:45:29+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]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :pljava-so```
I follow release instructions but I am getting a link error building the archive about the Reachability library not being found:
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Reachability'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/connectivity'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/path_provider'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/url_launcher'
ld: library not found for -lReachability
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've played around for half a day and so far no luck resolving this - could anyone help a mac.flutter newbie out?
Opening the .xcodeproj extension file instead of the .xcworkspace worked for me.
I'm making an app in Xcode 6.1.1, and just changed the name of the app, and afterwards I'm getting this "Apple Mach-O Linker Error" build failed error.
It says "ld: file not found:", probably because it can't find the placement of some file with the new name.. Any suggestions?
ld: file not found: /Users/rb/Library/Developer/Xcode/DerivedData/Which_Club-gkgjdxflldelikaopinkdoskkers/Build/Products/Debug-iphoneos/WhichClubToUse.app/WhichClubToUse
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"Which_club" is the new name of the project, and "WhichClubToUse" is the old name..
I found the solution! Under my [project]Tests -> general, i needed to select the new Host Application
I am trying to convert NSString to MD5 Hash. I have used this algorithm MD5 algorithm in Objective C
While running the program I am getting following error
ld: library not found for -lcommonCrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone tell me what I am missing here?
I have also added libcommonCrypto.dylib
Just remove the library from Build Phase -> Link Binary with Libraries. It would resolve the issue
I am trying to run my app on device but it is giving error for device working fine for iPhone simulator.
ld: warning: directory not found for option '-L/Users/Documents/TEST/../CorePlotDemo/CorePlotDemo'
ld: warning: directory not found for option '-L/Users/TEST/../CorePlotDemo/CorePlotDemo'
ld: library not found for -lsqlite3.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How To solve this error, I also tried with Library Search Path but not working .
Add library libCorePlot-CocoaTouch.a
And set path in build Setting -> Search Path -> Library Search Path -> $(inherited) "$(SRCROOT)/Libs/CorePlot"
This is the path of libCorePlot-CocoaTouch.a.