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

Undefined symbol: ut_ignore registration issue #17

Open
wittenberg opened this issue Sep 12, 2017 · 4 comments
Open

Undefined symbol: ut_ignore registration issue #17

wittenberg opened this issue Sep 12, 2017 · 4 comments

Comments

@wittenberg
Copy link

I am getting an error during installation of uduntis2 under R 3.4.1. An undefined symbol: ut_ignore in file ‘udunits2/libs/udunits2.so’: Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’

install.packages("udunits2")
Installing package into ‘/home/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.uni-muenster.de/src/contrib/udunits2_0.13.tar.gz'
Content type 'application/x-gzip' length 67182 bytes (65 KB)
==================================================
downloaded 65 KB

* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... yes
checking udunits2.h presence... yes
checking for udunits2.h... yes
checking for ut_read_xml in -ludunits2... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c udunits2_R.c -o udunits2_R.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o udunits2.so udunits2_R.o -fopenmp -lgomp -L/usr/lib/R/lib -lR
installing to /home/R/x86_64-pc-linux-gnu-library/3.4/udunits2/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘udunits2’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/R/x86_64-pc-linux-gnu-library/3.4/udunits2/libs/udunits2.so':
  /home/R/x86_64-pc-linux-gnu-library/3.4/udunits2/libs/udunits2.so: undefined symbol: ut_ignore
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/R/x86_64-pc-linux-gnu-library/3.4/udunits2’

The downloaded source packages are in
	‘/tmp/RtmprikgzO/downloaded_packages’
Warning message:
In install.packages("udunits2") :
  installation of package ‘udunits2’ had non-zero exit status

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux buster/sid

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.20.so

locale:
 [1] LC_CTYPE=en_GB.utf8       LC_NUMERIC=C             
 [3] LC_TIME=en_GB.utf8        LC_COLLATE=en_GB.utf8    
 [5] LC_MONETARY=en_GB.utf8    LC_MESSAGES=en_GB.utf8   
 [7] LC_PAPER=en_GB.utf8       LC_NAME=C                
 [9] LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C      

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

loaded via a namespace (and not attached):
[1] compiler_3.4.1
@jameshiebert
Copy link
Contributor

What version of libuduits2 do you have installed on your system. I seem to recall seeing this if one has an older version of the library (< 2.2?).

@wittenberg
Copy link
Author

Currently, I have libudunits2-0 (version 2.2.25-2) installed.

@edzer
Copy link
Contributor

edzer commented Oct 20, 2017

The link step is wrong: -ludunits2 -lexpat is missing. I see:

> install.packages("udunits2")
Installing package into ‘/home/edzer/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.uni-muenster.de/src/contrib/udunits2_0.13.tar.gz'
Content type 'application/x-gzip' length 67182 bytes (65 KB)
==================================================
downloaded 65 KB

* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... yes
checking udunits2.h presence... yes
checking for udunits2.h... yes
checking for ut_read_xml in -ludunits2... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-qgS9xW/r-base-3.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c udunits2_R.c -o udunits2_R.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o udunits2.so udunits2_R.o -ludunits2 -lexpat -lexpat -ludunits2 -L/usr/lib/R/lib -lR
installing to /home/edzer/R/x86_64-pc-linux-gnu-library/3.4/udunits2/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (udunits2)

The downloaded source packages are in
	‘/tmp/RtmpFzocLr/downloaded_packages’

Could you maybe unpack the library, and then install with

R CMD INSTALL udunits2

and then verify the contents of udunits2/src/Makevars? It should have the -ludunits2 -lexpat in it.

@pat-s
Copy link

pat-s commented Apr 15, 2020

Could you maybe unpack the library, and then install with

R CMD INSTALL udunits2

and then verify the contents of udunits2/src/Makevars? It should have the -ludunits2 -lexpat in it.

I just tested this. {udunits2} has no plain Makevars and adding it with the same contents that are in Makevars from {units} does not help.

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

4 participants