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

build error on xlstool.c on cygwin with gcc 4.9.3 (static declaration of ‘asprintf’ follows non-static declaration) #124

Closed
fsbooks opened this issue Aug 31, 2015 · 0 comments · Fixed by #244

Comments

@fsbooks
Copy link

fsbooks commented Aug 31, 2015

I get the same error with the development code.

In cygwin, I have installed the following packages if it makes a difference:

10k 2015/02/20 C:\cygwin\bin\cygasprintf-0.dll
libasprintf-devel 0.19.4-1 OK
libasprintf0 0.19.4-1 OK

Here is the text of the cran build:

install.packages("readxl") Installing package into ‘/usr/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.stat.ucla.edu/src/contrib/readxl_0.1.0.tar.gz'
Content type 'application/x-tar' length 316876 bytes (309 KB)

opened URL

downloaded 309 KB

  • installing source package ‘readxl’ ...
    ** package ‘readxl’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -std=c++11 -ggdb -O2 -pipe -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c RcppExports.cpp -o RcppExports.o

g++ -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -std=c++11 -ggdb -O2 -pipe -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c XlsWorkBook.cpp -o XlsWorkBook.o

g++ -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -std=c++11 -ggdb -O2 -pipe -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c XlsWorkSheet.cpp -o XlsWorkSheet.o

g++ -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -std=c++11 -ggdb -O2 -pipe -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c XlsxWorkBook.cpp -o XlsxWorkBook.o

g++ -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -std=c++11 -ggdb -O2 -pipe -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c XlsxWorkSheet.cpp -o XlsxWorkSheet.o

g++ -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -std=c++11 -ggdb -O2 -pipe -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c benchmarks.cpp -o benchmarks.o

gcc -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -ggdb -O2 -pipe -Wimplicit-function-declaration -std=gnu99 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c endian.c -o endian.o

gcc -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -ggdb -O2 -pipe -Wimplicit-function-declaration -std=gnu99 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c ole.c -o ole.o

gcc -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -ggdb -O2 -pipe -Wimplicit-function-declaration -std=gnu99 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c xls.c -o xls.o

gcc -I/usr/lib/R/include -DNDEBUG -Iunix -I. -I"/usr/lib/R/site-library/Rcpp/include" -ggdb -O2 -pipe -Wimplicit-function-declaration -std=gnu99 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/build=/usr/src/debug/R-3.1.3-1 -fdebug-prefix-map=/pub/devel/R/R-3.1.3-1.x86_64/src/R-3.1.3=/usr/src/debug/R-3.1.3-1 -c xlstool.c -o xlstool.o

xlstool.c:167:12: error: static declaration of ‘asprintf’ follows non-static declaration
static int asprintf(char **ret, const char *format, ...)
^

In file included from /usr/include/sys/reent.h:13:0,

             from /usr/include/math.h:5,

             from xlstool.c:35:

/usr/include/stdio.h:253:5: note: previous declaration of ‘asprintf’ was here
int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...)
^

/usr/lib/R/etc/Makeconf:133: recipe for target 'xlstool.o' failed

make: *** [xlstool.o] Error 1

ERROR: compilation failed for package ‘readxl’

  • removing ‘/usr/lib/R/site-library/readxl’

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

@lock lock bot locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant