You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to install in Alpine linux 3.20 but it fails, trying to use fseeko64.
I think that fseeko64 is provided by glibc, but alpine uses Musl instead.
g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG -I'/usr/lib/R/library/Rcpp/include' -I'/usr/lib/R/library/systemfonts/include' -fpic -O2 -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_ENABLE_HARDENED_MODE=1 -fno-plt -D__MUSL__ -c tinyxml2.cpp -o tinyxml2.o
tinyxml2.cpp: In member function 'tinyxml2::XMLError tinyxml2::XMLDocument::LoadFile(FILE*)':
tinyxml2.cpp:110:29: error: 'fseeko64' was not declared in this scope; did you mean 'fseeko'?
110 | #define TIXML_FSEEK fseeko64
| ^~~~~~~~
tinyxml2.cpp:2335:5: note: in expansion of macro 'TIXML_FSEEK'
2335 | TIXML_FSEEK( fp, 0, SEEK_SET );
| ^~~~~~~~~~~
tinyxml2.cpp:111:29: error: 'ftello64' was not declared in this scope; did you mean 'ftello'?
111 | #define TIXML_FTELL ftello64
| ^~~~~~~~
tinyxml2.cpp:2345:44: note: in expansion of macro 'TIXML_FTELL'
2345 | const long long fileLengthSigned = TIXML_FTELL( fp );
| ^~~~~~~~~~~
make: *** [/usr/lib/R/etc/Makeconf:204: tinyxml2.o] Error 1
ERROR: compilation failed for package ‘ggiraph’
Changing fseeko64 to fseeko in src/tinyxml2.cpp allows to compile in Alpine.
Maybe this can fix it:
#if defined(__GLIBC__) // Use fseeko64 if glibc is present
#defineTIXML_FSEEK fseeko64
#defineTIXML_FTELL ftello64
#else// If using musl (like Alpine Linux), fall back to fseeko/ftello
#defineTIXML_FSEEK fseeko
#defineTIXML_FTELL ftello
#endif
#Chatgpt generated by the way
The text was updated successfully, but these errors were encountered:
I'm trying to install in Alpine linux 3.20 but it fails, trying to use fseeko64.
I think that fseeko64 is provided by glibc, but alpine uses Musl instead.
Changing fseeko64 to fseeko in src/tinyxml2.cpp allows to compile in Alpine.
Maybe this can fix it:
The text was updated successfully, but these errors were encountered: