compilation issues on Debian
I am trying to compile the latest version on:
Linux proc001 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
and get following compilation errors:
[ 21%] Building CXX object src/CMakeFiles/gdl.dir/saverestore.cpp.o
gdl-v1.0.4/src/saverestore.cpp: In function ?void lib::wr_writeNode(sccstruct, XDR*)?:
gdl-v1.0.4/src/saverestore.cpp:163:3: error: ?xdr_u_int64_t? was not declared in this scope
xdr_u_int64_t(xdrs, & ul6);
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:163:3: note: suggested alternative: ?xdr_uint64_t?
xdr_u_int64_t(xdrs, & ul6);
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:199:3: error: ?xdr_u_int32_t? was not declared in this scope
xdr_u_int32_t(xdrs, & ul);
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:199:3: note: suggested alternative: ?xdr_uint32_t?
xdr_u_int32_t(xdrs, & ul);
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp: In function ?bool lib::rd_readNode(EnvT*, XDR*, std::vector<lib::_SAVENODE_STRUCT_>&)?:
gdl-v1.0.4/src/saverestore.cpp:280:3: error: ?xdr_u_int64_t? was not declared in this scope
xdr_u_int64_t(xdrs, & ul6);
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:280:3: note: suggested alternative: ?xdr_uint64_t?
xdr_u_int64_t(xdrs, & ul6);
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:322:3: error: ?xdr_u_int32_t? was not declared in this scope
xdr_u_int32_t(xdrs, & ul);
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:322:3: note: suggested alternative: ?xdr_uint32_t?
xdr_u_int32_t(xdrs, & ul);
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp: In function ?u_int64_t lib::writeNewRecordHeader(XDR*, int)?:
gdl-v1.0.4/src/saverestore.cpp:431:5: error: ?xdr_u_int32_t? was not declared in this scope
xdr_u_int32_t(xdrs, &ptrs0); //-12 //void, to be updated
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:431:5: note: suggested alternative: ?xdr_uint32_t?
xdr_u_int32_t(xdrs, &ptrs0); //-12 //void, to be updated
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp: In function ?u_int64_t lib::updateNewRecordHeader(XDR*, u_int64_t)?:
gdl-v1.0.4/src/saverestore.cpp:462:4: error: ?xdr_u_int64_t? was not declared in this scope
xdr_u_int64_t(xdrs, &next);
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:462:4: note: suggested alternative: ?xdr_uint64_t?
xdr_u_int64_t(xdrs, &next);
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:467:5: error: ?xdr_u_int32_t? was not declared in this scope
xdr_u_int32_t(xdrs, &first);
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:467:5: note: suggested alternative: ?xdr_uint32_t?
xdr_u_int32_t(xdrs, &first);
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp: In function ?u_int64_t lib::writeDSubUD(XDR*, DSubUD*, bool)?:
gdl-v1.0.4/src/saverestore.cpp:513:2: error: ?xdr_u_int64_t? was not declared in this scope
xdr_u_int64_t(xdrs, &ENDOFLIST); //ENDOFLIST
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:513:2: note: suggested alternative: ?xdr_uint64_t?
xdr_u_int64_t(xdrs, &ENDOFLIST); //ENDOFLIST
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp: In function ?void lib::fillVariableData(XDR*, BaseGDL*)?:
gdl-v1.0.4/src/saverestore.cpp:1430:89: error: ?xdr_u_int16_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DUInt), (xdrproc_t) xdr_u_int16_t)) cerr << "error GDL_UINT" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1430:89: note: suggested alternative: ?xdr_uint16_t?
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DUInt), (xdrproc_t) xdr_u_int16_t)) cerr << "error GDL_UINT" << endl;
^~~~~~~~~~~~~
xdr_uint16_t
gdl-v1.0.4/src/saverestore.cpp:1440:90: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong), (xdrproc_t) xdr_u_int32_t)) cerr << "error GDL_ULONG" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1440:90: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong), (xdrproc_t) xdr_u_int32_t)) cerr << "error GDL_ULONG" << endl;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:1450:92: error: ?xdr_u_int64_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong64), (xdrproc_t) xdr_u_int64_t)) cerr << "error GDL_ULONG64" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1450:92: note: suggested alternative: ?xdr_uint64_t?
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong64), (xdrproc_t) xdr_u_int64_t)) cerr << "error GDL_ULONG64" << endl;
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp: In function ?void lib::writeVariableData(XDR*, BaseGDL*)?:
gdl-v1.0.4/src/saverestore.cpp:1546:89: error: ?xdr_u_int16_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DUInt), (xdrproc_t) xdr_u_int16_t)) cerr << "error GDL_UINT" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1546:89: note: suggested alternative: ?xdr_uint16_t?
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DUInt), (xdrproc_t) xdr_u_int16_t)) cerr << "error GDL_UINT" << endl;
^~~~~~~~~~~~~
xdr_uint16_t
gdl-v1.0.4/src/saverestore.cpp:1556:90: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong), (xdrproc_t) xdr_u_int32_t)) cerr << "error GDL_ULONG" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1556:90: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong), (xdrproc_t) xdr_u_int32_t)) cerr << "error GDL_ULONG" << endl;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:1566:92: error: ?xdr_u_int64_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong64), (xdrproc_t) xdr_u_int64_t)) cerr << "error GDL_ULONG64" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1566:92: note: suggested alternative: ?xdr_uint64_t?
if (!xdr_vector(xdrs, (char*) var->DataAddr(), nEl, sizeof (DULong64), (xdrproc_t) xdr_u_int64_t)) cerr << "error GDL_ULONG64" << endl;
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:1619:87: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) &heapNumber, nEl, sizeof (int32_t), (xdrproc_t) xdr_u_int32_t)) cerr << "error PTR" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1619:87: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_vector(xdrs, (char*) &heapNumber, nEl, sizeof (int32_t), (xdrproc_t) xdr_u_int32_t)) cerr << "error PTR" << endl;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:1632:87: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_vector(xdrs, (char*) &heapNumber, nEl, sizeof (int32_t), (xdrproc_t) xdr_u_int32_t)) cerr << "error OBJ" << endl;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:1632:87: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_vector(xdrs, (char*) &heapNumber, nEl, sizeof (int32_t), (xdrproc_t) xdr_u_int32_t)) cerr << "error OBJ" << endl;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp: In function ?void lib::gdl_restore(EnvT*)?:
gdl-v1.0.4/src/saverestore.cpp:2068:14: error: ?xdr_u_int64_t? was not declared in this scope
if (!xdr_u_int64_t(xdrs, &my_ulong64)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2068:14: note: suggested alternative: ?xdr_uint64_t?
if (!xdr_u_int64_t(xdrs, &my_ulong64)) break;
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:2074:8: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_u_int32_t(xdrs, &ptr_low)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2074:8: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_u_int32_t(xdrs, &ptr_low)) break;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:2075:8: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_u_int32_t(xdrs, &ptr_high)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2075:8: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_u_int32_t(xdrs, &ptr_high)) break;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:2264:9: error: ?xdr_u_int64_t? was not declared in this scope
if (!xdr_u_int64_t(xdrs, &my_ulong64)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2264:9: note: suggested alternative: ?xdr_uint64_t?
if (!xdr_u_int64_t(xdrs, &my_ulong64)) break;
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:2269:9: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_u_int32_t(xdrs, &ptr_low)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2269:9: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_u_int32_t(xdrs, &ptr_low)) break;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:2270:9: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_u_int32_t(xdrs, &ptr_high)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2270:9: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_u_int32_t(xdrs, &ptr_high)) break;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:2303:14: error: ?xdr_u_int64_t? was not declared in this scope
if (!xdr_u_int64_t(xdrs, &my_ulong64)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2303:14: note: suggested alternative: ?xdr_uint64_t?
if (!xdr_u_int64_t(xdrs, &my_ulong64)) break;
^~~~~~~~~~~~~
xdr_uint64_t
gdl-v1.0.4/src/saverestore.cpp:2308:8: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_u_int32_t(xdrs, &ptr_low)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2308:8: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_u_int32_t(xdrs, &ptr_low)) break;
^~~~~~~~~~~~~
xdr_uint32_t
gdl-v1.0.4/src/saverestore.cpp:2309:8: error: ?xdr_u_int32_t? was not declared in this scope
if (!xdr_u_int32_t(xdrs, &ptr_high)) break;
^~~~~~~~~~~~~
gdl-v1.0.4/src/saverestore.cpp:2309:8: note: suggested alternative: ?xdr_uint32_t?
if (!xdr_u_int32_t(xdrs, &ptr_high)) break;
^~~~~~~~~~~~~
xdr_uint32_t
make[2]: *** [src/CMakeFiles/gdl.dir/build.make:1896: src/CMakeFiles/gdl.dir/saverestore.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:103: src/CMakeFiles/gdl.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
'''
anybody can help?
I do have a computer with exactly the same distros & kernel :smile:
I can compile the current version without any trouble
Did you try with the script ? It seems to me a package is missing
Do you have the package related to #include <rpc/xdr.h> : libtirpc-common
flowing the answer of dpkg -l *rpc*
May be we have to carefully verify that CMake is OK today on that (a tricky change some months ago)
Yes, I run the script with prep/configure/build and it did not complain about the libtirpc-dev that was actually missing. Now it works.
Huge thanks!
On 12. May 2024, at 18:13, Alain @.***> wrote:
I do have a computer with exactly the same distros & kernel 😄
I can compile the current version without any trouble
Did you try with the script ? It seems to me a package is missing
Do you have the package related to #include <rpc/xdr.h> : libtirpc-common flowing the answer of dpkg -l rpc
— Reply to this email directly, view it on GitHub https://github.com/gnudatalanguage/gdl/issues/1828#issuecomment-2106376156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOC5K6DUHFIMG664CNJUVATZB7LP7AVCNFSM6AAAAABHTDAPSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGM3TMMJVGY. You are receiving this because you authored the thread.
I'm afraid this depends on what package has installed the "xdr.h" found on your machine.
Probably the best way is to check the name of one of these functions in CMake and use #define in the code to switch form one name to the other (they do the same job).
I think the explanation is in the source code of the script build_gdl.sh : it seems we forgot to add the tirpc in the APT block !
APT_PACKAGES=( ...
[...]
RPM_PACKAGES=(
libtirpc-devel
CQFD
What is strange on my side is on Ubuntu I see it with dpkg but not on the Debian 10 ... TBC
#1947 added libtirpc in APT_PACKAGES