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

[Bug] "cc" is used instead of ${CC} on Apple platforms for linking #609

Closed
Veence opened this issue May 11, 2020 · 0 comments · Fixed by #611
Closed

[Bug] "cc" is used instead of ${CC} on Apple platforms for linking #609

Veence opened this issue May 11, 2020 · 0 comments · Fixed by #611
Labels
bug Something isn't working

Comments

@Veence
Copy link

Veence commented May 11, 2020

The standard configure file has this line for SHLIB_LD for MacOS (Darwin) platforms:

SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"

And this causes links to be invoked with "cc" instead of whatever compiler has been selected to compile Grass. I have no idea why this is so, but this "cc" should be changed into ${CC} as it is done in Linux/FreeBSD cases.

--- configure.init      2020-05-11 09:53:05.000000000 +0200
+++ configure   2020-05-11 09:54:35.000000000 +0200
@@ -1541,7 +1541,7 @@
        *-apple-darwin*)
            SHLIB_CFLAGS="-fno-common"
            SHLIB_SUFFIX=".dylib"
-           SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
+           SHLIB_LD="${CC} -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
            ;;
        *-sun-solaris*)
@Veence Veence added the bug Something isn't working label May 11, 2020
nilason added a commit to nilason/grass that referenced this issue May 11, 2020
nilason added a commit to nilason/grass that referenced this issue May 12, 2020
wenzeslaus pushed a commit that referenced this issue May 12, 2020
Replaces a hardcoded cc by a configured ${CC} in SHLIB_LD. Fixes #609.
neteler pushed a commit that referenced this issue Aug 20, 2020
Replaces a hardcoded cc by a configured ${CC} in SHLIB_LD. Fixes #609.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant