Error while compiling the odbc package

Hi!

I installed RStudio Server successfully in a FreeBSD system and it is working fine.

The only issue that I found until now is an error when I try to update the ODBC package:

Here is the relevant part:

c++ -std=gnu++11 -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include   -Wall -Iinclude -std=c++11 -pthread  -O -fpic -MMD  -c -o time_zone_info.o src/time_zone_info.cc
src/time_zone_info.cc:64:10: error: cannot initialize return object of type 'char *' with an rvalue of type 'int'
  return strerror_r(errnum, buf, buflen);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[1]: Leaving directory '/tmp/Rtmp5OuFem/R.INSTALL11fa45c26d6f3/odbc/src/cctz'
gmake[1]: *** [<builtin>: time_zone_info.o] Error 1
gmake: *** [Makevars:16: cctz/libcctz.a] Error 2
ERROR: compilation failed for package ‘odbc’
* removing ‘/usr/home/zamana/R/amd64-portbld-freebsd12.2-library/4.1/odbc’
Warning in install.packages :
  installation of package ‘odbc’ had non-zero exit status

It seems a programming error in the source code.

Where should I report this kind of problem?

Thanks.
Regards.

If you are sure this is a bug, you should file an issue on the GitHub repository

Although, since FreeBSD is not an officially supported OS most likely this issue has to do with an incompatible compiler, make sure you comply with the required minimal dependencies.

odbc and it’s dependencies use C++11 features. Therefore you need gcc 4.8, clang 3.3 or Rtools 3.3 or later.

Hi!

Thanks for the info regarding the Github repository.

By the way, here is the C++ version that I'm using:

root@lab:~ # c++ --version
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
Target: x86_64-unknown-freebsd12.2
Thread model: posix
InstalledDir: /usr/bin

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.