• Error compiling fidoconf

    From Angel Ripoll@2:341/66 to Todos on Sat Mar 13 01:29:26 2021
    Hola Todos!

    I just did a husky update and when I compiled fidoconf it gave me this error:

    root@bbs:/srv/fido/src/husky/fidoconf# make all
    gcc -Wall -c -s -O3 -fomit-frame-pointer -fstrength-reduce -fPIC -O3 -DUNIX -DCFGDIR=\"/etc/fido\" -DPATH_DELIM=\'/\' -c -fPIC -Wall -ggdb -DUNIX -I.. -Wno-char-subscripts -Ifidoconf -I/usr/include src/afixcmn.c
    src/afixcmn.c: In function ‘createXMSG’:
    src/afixcmn.c:342:67: error: ‘FTSC_DATE_SIZE’ undeclared (first use in this function); did you mean ‘XMSG_TO_SIZE’?
    strncpy((char *)msgHeader.__ftsc_date, (char *)msg->datetime, FTSC_DATE_SIZE);
    ^~~~~~~~~~~~~~
    XMSG_TO_SIZE src/afixcmn.c:342:67: note: each undeclared identifier is reported only once for each function it appears in
    make: *** [makefile.inc:27: afixcmn.o] Error 1

    How can i fix it?

    Un saludo,
    Angel Ripoll
    aripoll @ zruspas.org

    --- GoldED+/LNX 1.1.5-b20180707 + HPT 1.9 + Binkd 1.1 en Debian
    * Origin: Synchronet - bbs.zruspas.org - Zruspa's BBS - (2:341/66)
  • From Michael Dukelsky@2:5020/1042 to Angel Ripoll on Sat Mar 13 10:57:36 2021
    Hello Angel,

    Saturday March 13 2021, Angel Ripoll wrote to Todos:

    root@bbs:/srv/fido/src/husky/fidoconf# make all
    gcc -Wall -c -s -O3 -fomit-frame-pointer -fstrength-reduce -fPIC -O3 -DUNIX -DCFGDIR=\"/etc/fido\" -DPATH_DELIM=\'/\' -c -fPIC -Wall -ggdb -DUNIX -I.. -Wno-char-subscripts -Ifidoconf -I/usr/include
    src/afixcmn.c src/afixcmn.c: In function
    ‘createXMSG’: src/afixcmn.c:342:67: error: ‘FTSC_DATE_SIZE’ undeclared (first use in this function); did you mean
    ‘XMSG_TO_SIZE’? strncpy((char *)msgHeader.__ftsc_date, (char *)msg->datetime, FTSC_DATE_SIZE);

    ^~~~~~~~~~~~~~

    XMSG_TO_SIZE src/afixcmn.c:342:67: note: each undeclared identifier is reported only once for each function it appears in
    make: *** [makefile.inc:27: afixcmn.o] Error 1

    How can i fix it?

    FTSC_DATE_SIZE is defined in smapi. The error means you did not install smapi after compiling it. You have to install every subproject producing a library before compiling the next subproject.

    When I build rpm packages for Husky I bypass the installation of library subprojects during build by building everything together. I use `mock --chain` for that.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Angel Ripoll@2:341/66 to Michael Dukelsky on Sat Mar 13 18:23:52 2021

    *** respondiendo un mensaje puesto en el área personal (personal).

    Hola Michael!

    13 Mar 21 10:57, Michael Dukelsky escribió a Angel Ripoll:

    How can i fix it?

    FTSC_DATE_SIZE is defined in smapi. The error means you did not install smapi after compiling it. You have to install every subproject producing a library before compiling the next subproject.

    I did it.

    ****************
    root@bbs:/usr/src/ftn/husky/smapi# make all install
    make: No se hace nada para 'all'.
    mkdir -p //usr/include/smapi
    install -c -m 444 smapi/api_jam.h //usr/include/smapi
    install -c -m 444 smapi/api_jamp.h //usr/include/smapi
    install -c -m 444 smapi/api_sdm.h //usr/include/smapi
    install -c -m 444 smapi/api_sdmp.h //usr/include/smapi
    install -c -m 444 smapi/api_sq.h //usr/include/smapi
    install -c -m 444 smapi/api_sqp.h //usr/include/smapi
    install -c -m 444 smapi/apidebug.h //usr/include/smapi
    install -c -m 444 smapi/msgapi.h //usr/include/smapi
    install -c -m 444 smapi/old_msg.h //usr/include/smapi
    mkdir -p //usr/lib64
    install -c -m 444 libsmapi.a //usr/lib64
    root@bbs:/usr/src/ftn/husky/smapi# make all install^C root@bbs:/usr/src/ftn/husky/smapi# cd ..
    root@bbs:/usr/src/ftn/husky# cd fidoconf/
    root@bbs:/usr/src/ftn/husky/fidoconf# make all install
    gcc -Wall -c -s -O3 -fomit-frame-pointer -fstrength-reduce -fPIC -O3 -DUNIX -DCFGDIR=\"/etc/fido\" -DPATH_DELIM=\'/\' -c -fPIC -Wall -ggdb -DUNIX -I.. -Wno-char-subscripts -Ifidoconf -I/usr/include src/afixcmn.c
    src/afixcmn.c: In function ‘createXMSG’:
    src/afixcmn.c:342:67: error: ‘FTSC_DATE_SIZE’ undeclared (first use in this function); did you mean ‘XMSG_TO_SIZE’?
    strncpy((char *)msgHeader.__ftsc_date, (char *)msg->datetime, FTSC_DATE_SIZE);
    ^~~~~~~~~~~~ ~~
    XMSG_TO_SIZE src/afixcmn.c:342:67: note: each undeclared identifier is reported only once for each function it appears in
    make: *** [makefile.inc:27: afixcmn.o] Error 1 root@bbs:/usr/src/ftn/husky/fidoconf#
    ****************

    Un saludo,
    Angel Ripoll
    aripoll @ zruspas.org

    --- GoldED+/LNX 1.1.5-b20180707 + HPT 1.9 + Binkd 1.1 en Debian
    * Origin: Synchronet - bbs.zruspas.org - Zruspa's BBS - (2:341/66)
  • From Michael Dukelsky@2:5020/1042 to Angel Ripoll on Sun Mar 14 17:09:10 2021
    Hello Angel,

    Saturday March 13 2021, Angel Ripoll wrote to Michael Dukelsky:


    -DUNIX -I.. -Wno-char-subscripts -Ifidoconf -I/usr/include
    src/afixcmn.c src/afixcmn.c: In function
    ‘createXMSG’: src/afixcmn.c:342:67: error: ‘FTSC_DATE_SIZE’ undeclared (first use in this function); did you mean
    ‘XMSG_TO_SIZE’?
    strncpy((char *)msgHeader.__ftsc_date, (char *)msg->datetime, FTSC_DATE_SIZE);

    ^~~~~~~~~~~~ ~~

    Please pull fidoconf and rebuild it.

    BTW it is not recommended to compile a program from root. It is better to build it this way:

    $ make
    $ sudo make install

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Angel Ripoll@2:341/66 to Michael Dukelsky on Mon Mar 15 00:06:40 2021
    Hola Michael!

    14 Mar 21 17:09, Michael Dukelsky escribió a Angel Ripoll:

    Hello Angel,

    Please pull fidoconf and rebuild it.

    Fixed fidoconf!

    Now i can't complile areafix:

    ****************
    src/areafix.c: In function ‘processAreaFix’:
    src/areafix.c:3706:29: error: incompatible type for argument 1 of ‘addrComp’

    [...]

    src/areafix.c:4292:62: error: incompatible type for argument 1 of ‘aka2str’
    w_log(LL_ERR, "Unknown link address %s", aka2str(&toAddr));
    ^~~~~~~
    In file included from src/areafix.c:65: /usr/local/include/fidoconf/common.h:166:16: note: expected ‘hs_addr’ {aka ‘const struct _netaddr’} but argument is of type ‘hs_addr *’ {aka ‘struct _netaddr *’}
    HUSKYEXT char *aka2str(const hs_addr aka);
    ^~~~~~~
    src/areafix.c:4296:41: error: incompatible type for argument 1 of ‘aka2str’
    toAka = (*call_sstrdup)(aka2str(&toLink->hisAka));
    ^~~~~~~~~~~~~~~
    In file included from src/areafix.c:65: /usr/local/include/fidoconf/common.h:166:16: note: expected ‘hs_addr’ {aka ‘const struct _netaddr’} but argument is of type ‘hs_addr *’ {aka ‘struct _netaddr *’}
    HUSKYEXT char *aka2str(const hs_addr aka);
    ^~~~~~~
    src/areafix.c:4272:26: warning: variable ‘rt’ set but not used [-Wunused-but-set-variable]
    s_link_robot * rf, * rt = NULL;
    ^~
    src/areafix.c:4272:20: warning: variable ‘rf’ set but not used [-Wunused-but-set-variable]
    s_link_robot * rf, * rt = NULL;
    ^~
    make: *** [Makefile:47: areafix.o] Error 1
    ftn@bbs:/usr/src/ftn/husky/areafix$
    ***************


    BTW it is not recommended to compile a program from root. It is better to build it this way:

    Ok.

    Un saludo,
    Angel Ripoll
    aripoll @ zruspas.org

    --- GoldED+/LNX 1.1.5-b20180707 + HPT 1.9 + Binkd 1.1 en Debian
    * Origin: Synchronet - bbs.zruspas.org - Zruspa's BBS - (2:341/66)
  • From Michael Dukelsky@2:5020/1042 to Angel Ripoll on Mon Mar 15 14:57:12 2021
    Hello Angel,

    Monday March 15 2021, Angel Ripoll wrote to Michael Dukelsky:

    Now i can't complile areafix:

    In file included from src/areafix.c:65: /usr/local/include/fidoconf/common.h:166:16: note: expected
    ^^^^^^^^^^
    The header file was taken from /usr/local/include but you installed fidoconf header files to /usr/include. You have to use the same huskymak.cfg for all Husky compilations. The files in /usr/local/include could stay from the previous builds. It is better to delete now areafix, fidoconf, smapi, huskylib subdirectories of the /usr/local/include directory together with all files inside the subdirectories.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Angel Ripoll@2:341/66 to Michael Dukelsky on Fri Mar 19 14:51:04 2021
    Hola Michael!

    15 Mar 21 14:57, Michael Dukelsky escribió a Angel Ripoll:

    Hello Angel,

    Monday March 15 2021, Angel Ripoll wrote to Michael Dukelsky:

    Now i can't complile areafix:

    In file included from src/areafix.c:65:
    /usr/local/include/fidoconf/common.h:166:16: note: expected

    ^^^^^^^^^^
    The header file was taken from /usr/local/include but you installed fidoconf header files to /usr/include. You have to use the same huskymak.cfg for all Husky compilations. The files in /usr/local/include could stay from the previous builds. It is better to delete now areafix, fidoconf, smapi, huskylib subdirectories of the /usr/local/include directory together with all files inside the subdirectories.

    Ok. I'm going to download all the sources again to start from scratch. I'm going to compile them in their order (and not from root).

    Now the only error gives me in hpucode:

    ***************
    ftn@bbs:/usr/src/ftn/husky/hpucode$ make all
    gcc -I/usr/local/include -I./h -c -s -O3 -fomit-frame-pointer -fstrength-reduce -fPIC -Wall -Wall -pedantic -Wno-char-subscripts -DUNIX -c src/uuefile.c
    src/uuefile.c: In function ‘MakeTicFile’:
    src/uuefile.c:385:34: error: ‘CHAR’ undeclared (first use in this function); did you mean ‘UCHAR’?
    recodeToTransportCharset((CHAR*)uuc->description);
    ^~~~
    UCHAR
    src/uuefile.c:385:34: note: each undeclared identifier is reported only once for each function it appears in
    src/uuefile.c:385:39: error: expected expression before ‘)’ token
    recodeToTransportCharset((CHAR*)uuc->description);
    ^
    make: *** [Makefile:38: uuefile.o] Error 1
    ftn@bbs:/usr/src/ftn/husky/hpucode$
    **************

    Thanks :)

    Un saludo,
    Angel Ripoll
    aripoll @ zruspas.org

    --- GoldED+/LNX 1.1.5-b20180707 + HPT 1.9 + Binkd 1.1 en Debian
    * Origin: Synchronet - bbs.zruspas.org - Zruspa's BBS - (2:341/66)
  • From Michael Dukelsky@2:5020/1042 to Angel Ripoll on Sat Mar 20 16:53:26 2021
    Hello Angel,

    Friday March 19 2021, Angel Ripoll wrote to Michael Dukelsky:

    Now i can't complile areafix:

    In file included from src/areafix.c:65:
    /usr/local/include/fidoconf/common.h:166:16: note: expected

    ^^^^^^^^^^
    The header file was taken from /usr/local/include but you
    installed fidoconf header files to /usr/include. You have to use
    the same huskymak.cfg for all Husky compilations. The files in
    /usr/local/include could stay from the previous builds. It is
    better to delete now areafix, fidoconf, smapi, huskylib
    subdirectories of the /usr/local/include directory together with
    all files inside the subdirectories.

    Ok. I'm going to download all the sources again to start from
    scratch. I'm going to compile them in their order (and not from root).

    Now the only error gives me in hpucode:

    ***************
    ftn@bbs:/usr/src/ftn/husky/hpucode$ make all
    gcc -I/usr/local/include -I./h -c -s -O3 -fomit-frame-pointer
    ^^^^^^^^^^^^^^^^^^ It is the same.

    The directory is defined by setting the variable PREFIX in your huskymak.cfg. If you specify PREFIX=/usr, then the header files will be taken from /usr/include and if you specify PREFIX=/usr/local, then the header files will be taken from /usr/local/include. That is why it is important to use the same huskymak.cfg in all compilations.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Angel Ripoll@2:341/66 to Michael Dukelsky on Sun Mar 21 01:04:40 2021
    Hola Michael!

    20 Mar 21 16:53, Michael Dukelsky escribió a Angel Ripoll:

    gcc -I/usr/local/include -I./h -c -s -O3 -fomit-frame-pointer

    ^^^^^^^^^^^^^^^^^^ It is the same.

    It is not, i think.

    The directory is defined by setting the variable PREFIX in your huskymak.cfg. If you specify PREFIX=/usr, then the header files will be taken from /usr/include and if you specify PREFIX=/usr/local, then the header files will be taken from /usr/local/include. That is why it is important to use the same huskymak.cfg in all compilations.

    I am using the same huskymap.cfg for all builds. There is a huskymap.cfg in the root directory of all subdirectories of the project. In it, the PREFIX is in /usr/local. In fact ALL the projects I have compiled from scratch have worked fine, except hpucode.

    Un saludo,
    Angel Ripoll
    aripoll @ zruspas.org

    --- GoldED+/LNX 1.1.5-b20180707 + HPT 1.9 + Binkd 1.1 en Debian
    * Origin: Synchronet - bbs.zruspas.org - Zruspa's BBS - (2:341/66)
  • From Michael Dukelsky@2:5020/1042 to Angel Ripoll on Sun Mar 21 12:57:06 2021
    Hello Angel,

    Friday March 19 2021, Angel Ripoll wrote to Michael Dukelsky:

    -DUNIX -c src/uuefile.c src/uuefile.c: In function ‘MakeTicFile’: src/uuefile.c:385:34: error: ‘CHAR’ undeclared (first use in this function); did you mean ‘UCHAR’?
    recodeToTransportCharset((CHAR*)uuc->description);
    ^~~~
    UCHAR

    Fixed.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Moscow, Russia (2:5020/1042)
  • From Angel Ripoll@2:341/66 to Michael Dukelsky on Sun Mar 21 23:56:16 2021
    Hola Michael!

    21 Mar 21 12:57, Michael Dukelsky escribió a Angel Ripoll:

    recodeToTransportCharset((CHAR*)uuc->description);
    ^~~~
    UCHAR

    Fixed.

    Thanks. Now it works fine :)

    Un saludo,
    Angel Ripoll
    aripoll @ zruspas.org

    --- GoldED+/LNX 1.1.5-b20180707 + HPT 1.9 + Binkd 1.1 en Debian
    * Origin: Synchronet - bbs.zruspas.org - Zruspa's BBS - (2:341/66)