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

Linking fails on solaris #25

Closed
ablaette opened this issue Jun 27, 2021 · 1 comment
Closed

Linking fails on solaris #25

ablaette opened this issue Jun 27, 2021 · 1 comment

Comments

@ablaette
Copy link
Collaborator

Installing RcppCWB on Solaris fails, see the CRAN log. The problem occurs at the linking stage:

/opt/csw/bin/g++ -std=gnu++14 -shared -L/usr/local/lib -L/opt/csw/lib -o RcppCWB.so RcppExports.o cqp.o higher_level_functions.o utils.o -L/cl -L/cqp -L/utils -lcwb -lcqp -lcl
ld: fatal: library -lcwb: not found
ld: fatal: library -lcqp: not found
ld: fatal: library -lcl: not found
ld: fatal: file processing errors. No output written to RcppCWB.so

For some reason, statements on the path of static libraries are not passed into the linker command. It happens with RcppCWB v0.4.0, but not (yet) with RcppCWB v0.3.2.

@ablaette
Copy link
Collaborator Author

The call for the linker looks as follows:

/opt/csw/bin/g++-4.9 -std=gnu++11 -shared -m32 -march=pentiumpro -L/opt/csw/lib -o RcppCWB.so RcppExports.o cqp.o higher_level_functions.o utils.o -L/cl -L/cqp -L/utils -lcwb -lcqp -lcl

It results from something going wrong when defining the PKG_LIBS variable:

printf "PKG_LIBS=-L%s/cl -L%s/cqp -L%s/utils -lcwb -lcqp -lcl %s %s %s %s\n" ${CWB_DIR} ${CWB_DIR} ${CWB_DIR} "$GLIB_LINKER_FLAGS" "$PCRE_LIBDIRS" ${SOCKETLIB} "$CARBON" >> ./src/Makevars

The problem is that SOCKETLIB may include a whitespace sign. The problem does not occur when $SOCKETLIB is wrapped in quotation marks as follows.

printf "PKG_LIBS=-L%s/cl -L%s/cqp -L%s/utils -lcwb -lcqp -lcl %s %s %s %s\n" ${CWB_DIR} ${CWB_DIR} ${CWB_DIR} "$GLIB_LINKER_FLAGS" "$PCRE_LIBDIRS" "$SOCKETLIB" "$CARBON" >> ./src/Makevars

And this is how the configure script is changed.

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

1 participant