On Debian 11, rpcgen is not suitable to compile CDE 2.5.x. After
./autogen.sh
./configure
make
it throws these errors:
agent.c: In function ‘_DtCm_init_agent’:
agent.c:145:43: error: ‘AGENTVERS’ undeclared (first use in this function); did you mean ‘AGENTVERS_2’?
145 | (void)pmap_unset(_DtCm_transient, AGENTVERS);
| ^~~~~~~~~
| AGENTVERS_2
agent.c:145:43: note: each undeclared identifier is reported only once for each function it appears in
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../include -DANSICPP -DMULTIBYTE -DNLS16 -D_POSIX_SOURCE -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DUSE_XINERAMA -DUSE_XRENDER -DHAS_PAM_LIBRARY -DHAS_UTEMPTER_LIBRARY -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N -I../../include/csa -g -O2 -DOPT_TIRPC -I/usr/include/tirpc -Wno-unused-result -Wno-write-strings -fno-strict-aliasing -Wno-format-truncation -pthread -MT libcsa_la-cmcbxdr.lo -MD -MP -MF .deps/libcsa_la-cmcbxdr.Tpo -c cmcbxdr.c -o libcsa_la-cmcbxdr.o >/dev/null 2>&1
agent.c:152:46: error: ‘update_callback’ undeclared (first use in this function)
152 | if (registerrpc(_DtCm_transient, AGENTVERS, update_callback,
| ^~~~~~~~~~~~~~~
agent.c:153:25: error: ‘_DtCm_update_callback_1’ undeclared (first use in this function); did you mean ‘cmcb_update_callback_2’?
153 | (char *(*)(char *))_DtCm_update_callback_1, (xdrproc_t)_DtCm_xdr_Table_Res_4,
| ^~~~~~~~~~~~~~~~~~~~~~~
| cmcb_update_callback_2
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../include -DANSICPP -DMULTIBYTE -DNLS16 -D_POSIX_SOURCE -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DUSE_XINERAMA -DUSE_XRENDER -DHAS_PAM_LIBRARY -DHAS_UTEMPTER_LIBRARY -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N -I../../include/csa -g -O2 -DOPT_TIRPC -I/usr/include/tirpc -Wno-unused-result -Wno-write-strings -fno-strict-aliasing -Wno-format-truncation -pthread -MT libcsa_la-cm_clnt.lo -MD -MP -MF .deps/libcsa_la-cm_clnt.Tpo -c cm_clnt.c -o libcsa_la-cm_clnt.o >/dev/null 2>&1
agent.c:154:17: error: ‘_DtCm_xdr_Update_Status’ undeclared (first use in this function); did you mean ‘_DtCm_xdr_Appt_Status_4’?
154 | (xdrproc_t)_DtCm_xdr_Update_Status) == -1) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| _DtCm_xdr_Appt_Status_4
agent.c: In function ‘_DtCm_destroy_agent’:
agent.c:187:44: error: ‘AGENTVERS’ undeclared (first use in this function); did you mean ‘AGENTVERS_2’?
187 | (void) pmap_unset(_DtCm_transient, AGENTVERS);
| ^~~~~~~~~
| AGENTVERS_2
agent.c: At top level:
agent.c:292:1: error: unknown type name ‘Update_Status’
292 | Update_Status *
| ^~~~~~~~~~~~~
agent.c: In function ‘_DtCm_update_callback_1’:
agent.c:295:9: error: unknown type name ‘Update_Status’
295 | static Update_Status status = update_succeeded;
| ^~~~~~~~~~~~~
agent.c:295:32: error: ‘update_succeeded’ undeclared (first use in this function)
295 | static Update_Status status = update_succeeded;
| ^~~~~~~~~~~~~~~~
agent.c:307:15: error: ‘AGENTVERS’ undeclared (first use in this function); did you mean ‘AGENTVERS_2’?
307 | cbi->vers = AGENTVERS;
| ^~~~~~~~~
| AGENTVERS_2
agent.c: In function ‘_DtCm_handle_callback’:
agent.c:467:20: error: ‘AGENTVERS’ undeclared (first use in this function); did you mean ‘AGENTVERS_2’?
467 | if (ptr->vers == AGENTVERS)
| ^~~~~~~~~
| AGENTVERS_2
On the maillist, it turned out, that rpc is the culprit.
# rpcgen -h lib/csa/agent.x | grep AGENTVERS
/usr/bin/ld:lib/csa/agent.x: file format not recognized; treating as linker script
/usr/bin/ld:lib/csa/agent.x:22: syntax error
collect2: error: ld returned 1 exit status
rpcgen: C preprocessor failed with exit code 1
The newer Debians' rpcgen-s are not working, even if one installs it by hand: it requires the newer libc. Searching for "rpcgen source code" brings no solutions, as there are multiple rpcgen repositories available and it is unclear which rpcgen is which and which could handle CDE.
Which version of rpcgen do you use?
Could you check if agent.x is corrupted?
Unless
agent.xis not corrupted already in the package, then it is not corrupted, as i extracted it several times already.But if you tell me, how can i check that, then i'll do it and post the results.
I have tested rpcgen 2.31, it works well.
Could you upload your agent.x?
What cpp do you use?
My
agent.xis the one from the CDE (2.5.1 and 2.5.2; both was tested) archive from here: https://sourceforge.net/projects/cdesktopenv/files/src/Last edit: TCH 2023-11-27
Please use the following commands to check if cpp is set up correctly:
Well, here you go, but i don't understand why this is important, when Debian 11's
rpcgenalready proved to be insufficent. I had no problems with the system's cpp.Because rpcgen needs cpp. In your ticket, you could see the message: "error: ld returned 1 exit". Obviously, it's odd. The command ld was executed instead of cpp. So we have to help rpcgen find the right cpp.
Please try the following commands to see any of them works:
Last edit: hyousatsu 2023-11-27
I tried to build it again and that error is now gone... Perhaps when you told me to run
update-alternatives --config cppand i had to select the alternative then it became fixed?However, i now face a different error:
I don't know if there are other CPPs installed on you system. There is no further need to update alternatives if only the default CPP is installed on you system.
For the new error, have you installed the required locales? At least en_US.UTF-8 is required.
I've accidentally bumped into this ticket from an old email and just saw, that i did not reply to you. I am really sorry, i have no idea what happened then, perhaps i got no notification about the message, or i don't know. (Or maybe i did reply, but the later messages of the thread got lost in the meantime?)
As for the error, i do not remember anything now, but since i do have a manually built Debian package of CDE 2.5.2 in my CDE source directory with the date of 2023-11-28, it is evident, that i've managed to compile it later on that day.
I am not sure about if it was caused by the locales or not. Currently
locale -agives back these:I am not sure if they were the same last time, but i do think that
C,en_US.utf8andhu_HU.utf8were installed way back, when i installed Debian 7, because i always install those, but i cannot say for sure.Anyway, thank you very much for your help and i apologize again; i really do not know what happened, why did i not reply.
And of course, the ticket can be closed as invalid, since it was possible to compile CDE 2.5.2 on Debian 11.
No problem. You are welcome!
Can you install the rpcsvc-proto package? This is the 'Sun RPC' implementation. I think the one you have installed is some other sort of implementation shipped as part of libc6.
Maybe that was already suggested, not sure.
Yes, this part was covered on the maillist:
rpcsvc-protois not available under Debian 11, only 12, testing and unstable.