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

Compiling on Linux with gcc 7.5.0 #8

Closed
ai2ys opened this issue May 26, 2020 · 2 comments
Closed

Compiling on Linux with gcc 7.5.0 #8

ai2ys opened this issue May 26, 2020 · 2 comments

Comments

@ai2ys
Copy link

ai2ys commented May 26, 2020

URL in "XMP-Toolkit-SDK/tools/cmake/ReadMe.txt" for Linux does not exist

See: #7 (comment)

Line 79 of "XMP-Toolkit-SDK/build/shared/SharedConfig_Common.cmake"

The command "-dumpversion" does not work correctly with gcc version 7.5.0.
This will lead to errors during the make command

CMake Error at shared/SharedConfig_Common.cmake:94 (if):
  if given arguments:
 
     "LESS" "413"
 
 Unknown arguments specified

The output for "-dumpversion" and "--version"

$ gcc -dumpversion
7
$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Therefore the variable GCC_VERSION_STRING was not set correctly which let to the mentioned error. I had to replace "-dumpversion" using "--version" to make it work.

Line 187 of "XMP-Toolkit-SDK/build/ProductConfig.cmake"

set(XMP_PLATFORM_LINK "-z defs -Xlinker -Bsymbolic -Wl,--no-undefined  ${XMP_EXTRA_LINK_FLAGS} ${XMP_TOOLCHAIN_LINK_FLAGS} -lrt -Wl,--no-as-needed -ldl -lpthread ${XMP_GCC_LIBPATH}/libssp.a")`

In contrast to the description from the "XMP-Toolkit-SDK/build/README.txt" setting the variable "XMP_ENABLE_SECURE_SETTINGS" to "OFF" (Line 37 of "XMP-Toolkit-SDK/build/shared/ToolchainGCC.cmake") does not turn off the linking of the libssp.a which results in the following error.

[ 43%] Linking CXX shared library /adobe_dng_sdk/xmp_sdk/public/libraries/i80386linux_x64/release/libXMPCore.so
g++: error: /user/unicore/i80386linux_x64/compiler/gcc4.8.2/linux3.10_64/lib64/libssp.a: No such file or directory
/adobe_dng_sdk/xmp_sdk/XMPCore/build/gcc/dynamic/i80386linux_64/Release/CMakeFiles/XMPCore.dir/build.make:1583: recipe for target '/adobe_dng_sdk/xmp_sdk/public/libraries/i80386linux_x64/release/libXMPCore.so' failed

I had to modify Line 187 of "XMP-Toolkit-SDK/build/ProductConfig.cmake" to:

set(XMP_PLATFORM_LINK "-z defs -Xlinker -Bsymbolic -Wl,--no-undefined  ${XMP_EXTRA_LINK_FLAGS} ${XMP_TOOLCHAIN_LINK_FLAGS} -lrt -Wl,--no-as-needed -ldl -lpthread")
@ghost
Copy link

ghost commented Jun 13, 2020

Nice one thanks for the corrections ... perhaps do a PR so everyone can use it

@AlexImagineComm
Copy link

Thank you very much @ai2ys you really saved my life ! All your suggestions are great. I can build now on Ubuntu 18.04:
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
cmake version 3.15.5

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

No branches or pull requests

3 participants