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

update configure.ac to use C++ #236

Merged
merged 1 commit into from
Dec 1, 2022
Merged

update configure.ac to use C++ #236

merged 1 commit into from
Dec 1, 2022

Conversation

mtmorgan
Copy link
Collaborator

- test for sys/mman.h
- use AC_SEARCH_LIBS() to add -lrt if necessary, instead of
  AC_CHECK_LIB(), as recommended by
  https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Libraries.html
- updates #93, updates #94
@mtmorgan
Copy link
Collaborator Author

@spotrh Not sure if you still have a configuration where you can test this update? It uses C++ as configured by R when performing the test. It also tests for the availability (in C++) of the appropriate header file. This is from a comment from a CRAN member.

@mtmorgan mtmorgan merged commit b04cf1f into RELEASE_3_16 Dec 1, 2022
@mmokrejs
Copy link

mmokrejs commented Nov 1, 2023

I am hitting this with R-3.4.4 on Ubuntu-20.04 on which I am trying to install Bioconductor-3.6. I do not see configure.ac to be patched in the BiocParallel_1.12.0.tar.gz file.

But magic happened:

$ R CMD INSTALL BiocParallel_1.16.6.tar.gz 
* installing to library ‘/home/biomex/lib64/R/library’
* installing *source* package ‘BiocParallel’ ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for shm_open in -lrt... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I/home/biomex/lib64/R/include -DNDEBUG  -I"/home/biomex/lib64/R/library/BH/include" -I/usr/local/include   -fpic  -g -O2 -c ipcmutex.cpp -o ipcmutex.o
g++ -std=gnu++11 -shared -L/home/biomex/lib64/R/lib -L/usr/local/lib64 -o BiocParallel.so ipcmutex.o -lrt -L/home/biomex/lib64/R/lib -lR
installing to /home/biomex/lib64/R/library/BiocParallel/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (BiocParallel)
$

So the -lrt got into its place.

@mtmorgan
Copy link
Collaborator Author

mtmorgan commented Nov 2, 2023

@mmokrejs thanks for the report of success with BiocParallel_1.16.6.

Bioconductor-3.6 is from 2017 and is very old. Changes are introduced into the 'devel' or sometimes current release branch, but cannot be ported to earlier releases (Bioconductor does not allow commits to older releases, and does not build & propagate older packages).

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

Successfully merging this pull request may close these issues.

2 participants