ATS installation error - architecture arm64 not found for libxerces-c-3.2.dylib

172 views
Skip to first unread message

Phong Le

unread,
May 15, 2024, 6:08:57 PM5/15/24
to Amanzi-ATS Users
Hi everyone,

I am encountering an issue while install ATS on my Mac (M1) Sonoma 14.5. Initially, I face a problem with the TPL xerces, specifically a fatal error: 'unicode/uset.h' file not found

To resolve this, I attempted to symlink the unicode header files installed from homebrew to the SDK using the following command:

sudo find /opt/homebrew/Cellar/icu4c/74.2/include/unicode -type f -name "*.h" -exec ln -s {} /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unicode \;

However, this fix led to another issue still pertaining to the TPL xerces. I ran to an error while linking CXX shared library 'libxerces-c-3.2.dylib', with the following message:

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [src/libxerces-c-3.2.dylib] Error 1
make[4]: *** [src/CMakeFiles/xerces-c.dir/all] Error 2
make[3]: *** [all] Error 2

It appears to be an architecture mismatch issue in a C++ shared library. I removed and install CommandLineTools and brew, but it doesn't work.

I have attached the log file and output from the terminal. Any suggestion to resolve this issue is appreciated. Thank you.

Phong
terminal.txt
xerces-build-err.log

Coon, Ethan

unread,
May 15, 2024, 6:52:09 PM5/15/24
to Phong Le, Amanzi-ATS Users

So the problem is that Xerces doesn’t realize you are on a mac.  You should have, in your

 

$AMANZI_TPLS_BUILD_DIR/xerces/xerces-X.Y-build/CMakeCache.txt

 

that

 

XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER:BOOL=TRUE

 

But I suspect you have

 

XERCES_USE_TRANSCODER_ICU:BOOL=TRUE

 

instead (which I’m guessing is the default).

 

You could try forcing the issue by changing the CMakeCache.txt file directly, or you could try figuring out why, in


$AMANZI_TPLS_BUILD_DIR/xerces/xerces-X.Y-source/cmake/XercesTranscoderSelection.cmake

 

It fails to match macosunicodecoverter.

 

Ethan

 

 

 

--
You received this message because you are subscribed to the Google Groups "Amanzi-ATS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-users/b7d97179-f060-46bb-b99f-5808705b623fn%40googlegroups.com.

Phong Le

unread,
May 15, 2024, 10:53:49 PM5/15/24
to Amanzi-ATS Users
Hi Ethan.

This seems right direction. Although I have XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER:BOOL=TRUE in the CMakeCache.txt, the error is that the transcode:STRING was set to icu. I changed it to macosunicodeconverter as below, and now Xerces recognizes the arm64.
//Transcoder (icu|macosunicodeconverter|iconv)
transcoder:STRING=macosunicodeconverter

I ran into other minor issues but I was able to fix them. Finally, ats is installed again on my Mac now.

Thanks Ethan.
Reply all
Reply to author
Forward
0 new messages