Menu

#160 CDE 2.5.x does not compile on Debian 11, because of rpcgen

open
nobody
2025-04-09
2023-11-19
TCH
No

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.

Discussion

  • hyousatsu

    hyousatsu - 2023-11-25

    Which version of rpcgen do you use?
    Could you check if agent.x is corrupted?

     
  • TCH

    TCH - 2023-11-25
    # rpcgen --version
    rpcgen (Debian GLIBC 2.31-13+deb11u7) 2.31
    

    Unless agent.x is 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.

     
    • hyousatsu

      hyousatsu - 2023-11-26

      I have tested rpcgen 2.31, it works well.
      Could you upload your agent.x?
      What cpp do you use?

       
      • TCH

        TCH - 2023-11-27

        My agent.x is 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/

        # cc -v
        Using built-in specs.
        COLLECT_GCC=cc
        COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
        OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
        OFFLOAD_TARGET_DEFAULT=1
        Target: x86_64-linux-gnu
        Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
        Thread model: posix
        Supported LTO compression algorithms: zlib zstd
        gcc version 10.2.1 20210110 (Debian 10.2.1-6)
        
         

        Last edit: TCH 2023-11-27
        • hyousatsu

          hyousatsu - 2023-11-27

          Please use the following commands to check if cpp is set up correctly:

          • file /lib/cpp
          • update-alternatives --config cpp
          • command -v cpp
           
          • TCH

            TCH - 2023-11-27

            Well, here you go, but i don't understand why this is important, when Debian 11's rpcgen already proved to be insufficent. I had no problems with the system's cpp.

            root@Csabi:~
            # file /lib/cpp
            /lib/cpp: symbolic link to /etc/alternatives/cpp
            
            root@Csabi:~
            # update-alternatives --config cpp
            There is 1 choice for the alternative cpp (providing /lib/cpp).
            
              Selection    Path            Priority   Status
            ------------------------------------------------------------
              0            /usr/bin/cpp     10        auto mode
              1            /usr/bin/cpp     10        manual mode
            
            Press <enter> to keep the current choice[*], or type selection number: 0
            update-alternatives: using /usr/bin/cpp to provide /lib/cpp (cpp) in auto mode
            
            root@Csabi:~
            # command -v cpp
            /usr/bin/cpp
            
             
            • hyousatsu

              hyousatsu - 2023-11-27

              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:

              • /usr/bin/rpcgen -Y /lib -h lib/csa/agent.x
              • /usr/bin/rpcgen -Y /usr/bin -h lib/csa/agent.x
              • /usr/bin/rpcgen -Y /etc/alternatives -h lib/csa/agent.x
               

              Last edit: hyousatsu 2023-11-27
              • TCH

                TCH - 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 cpp and i had to select the alternative then it became fixed?

                However, i now face a different error:

                Making all in help
                make[3]: Entering directory '/tmp/cde-2.5.2/doc/en_US.UTF-8/help'
                SGML_SEARCH_PATH=".:.." \
                        /usr/bin/ksh ../../../programs/dtdocbook/doc_utils/dtdocbook2sdl -H ../../../programs/dthelp/parser/pass2/parser/dthelp_htag2 -L en_US.UTF-8 \
                                -o Appmanager.sdl `basename Appmanager.sdl .sdl`/book.sgm
                In entity PART included from Appmanager/book.sgm:53:0
                onsgmls:/tmp/cde-2.5.2/programs/dtdocbook/sgml/docbook.dtd:72:30:W: duplicate declaration of parameter entity "local.notations"
                dtdocbook2sdl fatal error:
                    Error processing book.out.21887.sdl by ../../../programs/dthelp/parser/pass2/parser/dthelp_htag2
                make[3]: *** [Makefile:1306: Appmanager.sdl] Error 1
                make[3]: Leaving directory '/tmp/cde-2.5.2/doc/en_US.UTF-8/help'
                make[2]: *** [Makefile:438: all-recursive] Error 1
                make[2]: Leaving directory '/tmp/cde-2.5.2/doc/en_US.UTF-8'
                make[1]: *** [Makefile:445: all-recursive] Error 1
                make[1]: Leaving directory '/tmp/cde-2.5.2/doc'
                make: *** [Makefile:585: all-recursive] Error 1
                
                 
                • hyousatsu

                  hyousatsu - 2023-11-28

                  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.

                   
                  • TCH

                    TCH - 2025-04-03

                    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 -a gives back these:

                    C
                    C.UTF-8
                    en_US.utf8
                    hu_HU.utf8
                    POSIX
                    

                    I am not sure if they were the same last time, but i do think that C, en_US.utf8 and hu_HU.utf8 were 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.

                     
                    • hyousatsu

                      hyousatsu - 2025-04-09

                      No problem. You are welcome!

                       
  • Jon Trulson

    Jon Trulson - 2023-11-25

    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.

     
    • TCH

      TCH - 2023-11-27

      Yes, this part was covered on the maillist: rpcsvc-proto is not available under Debian 11, only 12, testing and unstable.

       
      👍
      1

Log in to post a comment.

MongoDB Logo MongoDB