open-eid / libdigidocpp

Libdigidocpp library offers creating, signing and verification of digitally signed documents, according to XAdES and XML-DSIG standards. Documentation http://open-eid.github.io/libdigidocpp
Other
97 stars 45 forks source link

osx xalan build fails #568

Closed jmaster1 closed 9 months ago

jmaster1 commented 9 months ago

when executin "sh prepare_osx_build_environment.sh osx xalan" process ends with an error:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/xalanc/Utils/MsgCreator/MsgCreator] Error 1
make[1]: *** [src/xalanc/Utils/MsgCreator/CMakeFiles/MsgCreator.dir/all] Error 2
make: *** [all] Error 2
+ sudo install_name_tool -id /Library/libdigidocpp/lib/libxalanMsg.112.dylib '/Library/libdigidocpp/lib/libxalanMsg.*.0.dylib'
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: /Library/libdigidocpp/lib/libxalanMsg.*.0.dylib (No such file or directory)
metsma commented 9 months ago

can you post more logs?

jmaster1 commented 9 months ago

xalan.log here you are

metsma commented 9 months ago

Can you test proposed build script changes

jmaster1 commented 9 months ago

its still the same, unfortunately metsma.log

metsma commented 9 months ago

Use on clonig -b xcode branch

jmaster1 commented 9 months ago

indeed... now error on next step metsma2.log

metsma commented 9 months ago

Disabled NSS support in xml-security-c. can you try again?

jmaster1 commented 9 months ago

now step 3 works, appreciated! but step 5 fails: $ ./build-library.sh osx install Building for macOS -- The C compiler identification is AppleClang 15.0.0.15000040 -- The CXX compiler identification is AppleClang 15.0.0.15000040 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:8 (include): include could not find requested file:

VersionInfo

CMake Error at CMakeLists.txt:11 (set_env): Unknown CMake command "set_env".

-- Configuring incomplete, errors occurred!

metsma commented 9 months ago

Cmake submodule is missing. Use checkout —recursive

jmaster1 commented 9 months ago

$ git submodule update --init --recursive Submodule 'cmake' (https://github.com/metsma/cmake) registered for path 'cmake' Cloning into '/Users/timur.kozlov/my/metsma/libdigidocpp/cmake'... Submodule path 'cmake': checked out '0ead93415bb874083a46d8ef812d9d8b0dedb169' GE00308M:libdigidocpp timur.kozlov$ sh prepare_osx_build_environment.sh osx xalan GE00308M:libdigidocpp timur.kozlov$ ./build-library.sh osx install Building for macOS -- The C compiler identification is AppleClang 15.0.0.15000040 -- The CXX compiler identification is AppleClang 15.0.0.15000040 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Found OpenSSL: /Library/libdigidocpp/lib/libcrypto.dylib (found suitable version "3.0.11", minimum required is "1.1.1")
-- Could NOT find PKCS11 (missing: PKCS11_MODULE) -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE
-- Found XercesC: /Library/libdigidocpp/lib/libxerces-c.dylib (found version "3.2.4") -- Found OpenSSL: /Library/libdigidocpp/lib/libcrypto.dylib (found version "3.0.11")
-- Found XalanC: /Library/libdigidocpp/lib/libxalan-c.dylib (found version "1.12.0") -- Found XmlSecurityC: /Library/libdigidocpp/lib/libxml-security-c.dylib
CMake Error at /usr/local/Cellar/cmake/3.27.8/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find XSD: Found unsuitable version "Unknown option -version

.Unknown option -version

.Unknown option -version

", but required is at least "4.0" (found /Library/Frameworks/Mono.framework/Versions/Current/Commands/xsd) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.27.8/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE) cmake/modules/FindXSD.cmake:19 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:46 (find_package)

-- Configuring incomplete, errors occurred! GE00308M:libdigidocpp timur.kozlov$ cmake Usage

cmake [options] cmake [options] cmake [options] -S -B

Specify a source directory to (re-)generate a build system for it in the current working directory. Specify an existing build directory to re-generate its build system.

Run 'cmake --help' for more information.

metsma commented 9 months ago

Maybe you have some other tool with name xsd also in path? You need probably hint cmake to use homebrew installed xsd utility "-DXSD_EXECUTABLE=/opt/homebrew/bin/xsd"

jmaster1 commented 9 months ago

all works, thanks a lot! $ /Library/Frameworks/digidocpp.framework/Resources/digidoc-tool Version digidoc-tool version: 3.17.0.0 libdigidocpp version: 3.17.0.0 2023-11-29T15:36:21Z E [TSL.cpp:302] - TSL eu-lotl.xml signature is invalid 2023-11-29T15:36:22Z I [X509CertStore.cpp:63] - Loaded 0 certificates into TSL certificate store.