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

Can't build the package on OpenBSD 7.6 #183

Open
liar666 opened this issue Oct 13, 2024 · 4 comments
Open

Can't build the package on OpenBSD 7.6 #183

liar666 opened this issue Oct 13, 2024 · 4 comments

Comments

@liar666
Copy link

liar666 commented Oct 13, 2024

[could not find how to reopen issue #125 , so I'm opening a new one]

Not compiling on OpenBSD 7.6 as of today due to lacking "ps__list_apps" :(

> install.packages("ps", lib ="...")
...
** building package indices
** testing if installed package can be loaded from temporary location
R:/home/guigui/.R/x86_64-unknown-openbsd7.6-library/4.4/00LOCK-ps/00new/ps/libs/ps.so: undefined symbol 'ps__list_apps'
Error: package or namespace load failed for ‘ps’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/guigui/.R/x86_64-unknown-openbsd7.6-library/4.4/00LOCK-ps/00new/ps/libs/ps.so':
  Cannot load specified object
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/guigui/.R/x86_64-unknown-openbsd7.6-library/4.4/ps’
...
@liar666
Copy link
Author

liar666 commented Oct 16, 2024

Bump ?

@tmward
Copy link

tmward commented Oct 19, 2024

Hi same issue here. Clean install of R 4.4.1 on OpenBSD 7.6, and I encountered the error when trying to install tidyverse. Below is the terminal session from trying to install ps and also my sessionInfo. I also tried using gcc 8.4.0 as my compiler and received the exact same error message. Let me know if there's anything else that could help with debugging it!

Script started on Sat Oct 19 11:23:04 2024
lelantus$ R


R version 4.4.1 (2024-06-14) -- "Race for Your Life"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-unknown-openbsd7.6

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> insta..p� �� �� �ll.packages("ps")
Installing package into ‘/usr/local/R’
(as ‘lib’ is unspecified)
trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/ps_1.8.0.tar.gz'
Content type 'application/x-gzip' length 164258 bytes (160 KB)
==================================================
downloaded 160 KB

* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘OpenBSD clang version 16.0.6’
cc -O2 -pipe  -L/usr/local/lib -Wl,-R/usr/local/lib/R/lib -Wall px.c -o px
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c init.c -o init.o
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c api-common.c -o api-common.o
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c common.c -o common.o
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c extra.c -o extra.o
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c dummy.c -o dummy.o
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c error-codes.c -o error-codes.o
cc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -O2 -pipe  -c cleancall.c -o cleancall.o
cc -shared -fPIC -L/usr/local/lib/R/lib -L/usr/local/lib -Wl,-R/usr/local/lib/R/lib -o ps.so init.o api-common.o common.o extra.o dummy.o error-codes.o cleancall.o -L/usr/local/lib/R/lib -lR
installing via 'install.libs.R' to /usr/local/R/00LOCK-ps/00new/ps
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
R:/usr/local/R/00LOCK-ps/00new/ps/libs/ps.so: undefined symbol 'ps__list_apps'
Error: package or namespace load failed for ‘ps’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/R/00LOCK-ps/00new/ps/libs/ps.so':
  Cannot load specified object
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/R/ps’

The downloaded source packages are in
	‘/tmp/RtmpMOvZXl/downloaded_packages’
Warning message:
In install.packages("ps") :
  installation of package ‘ps’ had non-zero exit status
> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-unknown-openbsd7.6
Running under: OpenBSD lelantus.myDomain 7.6 GENERIC.MP#338 amd64

Matrix products: default
BLAS:   /usr/local/lib/R/lib/libRblas.so.40.0 
LAPACK: /usr/local/lib/R/lib/libRlapack.so.40.0;  LAPACK version 3.12.0

locale:
[1] C/en_US.UTF-8/C/C/C/C

time zone: America/New_York
tzcode source: system

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.4.1 tools_4.4.1   
> 
Save workspace image? [y/n/c]: n
lelantus$ ^D


Script done on Sat Oct 19 11:23:38 2024

@gaborcsardi
Copy link
Member

Have you actually tried installing ps from this repo?

@tmward
Copy link

tmward commented Oct 19, 2024

Oh great! It works installing from the latest source in the repo. Thank you for fixing this.

For those who come across this, installing the devel version of ps is a little tricky: a lot of packages used to install from Github won't work since they depend on ps or won't compile correctly. For example, devtools relies on ps, as does githubinstall. r-lib/pak won't compile on OpenBSD in the CRAN version (looking at the source this was since fixed! Thank you!) but will in the devel version as it uses the deprecated sys/timeb.h. So to install the working r-lib/ps from github, use the remotes package, which compiles with no issue, then install ps with remotes::install_github("r-lib/ps")

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