• Compiling SmapiNNTPd

    From Jay Harris@1:229/664 to All on Wed Jan 24 09:02:54 2024
    Hi All,

    I seem to be stuck trying to compile SmapiNNTPd.

    I have hpt installed with DYNLIBS=1, PREFIX=/usr/local & LIBDIR=${PREFIX}/lib in huskymak.cfg.

    I had to add /usr/local/lib to /etc/ld.so.conf.d/your_lib.conf and then run sudo ldconfig to allow husky to run.

    $ hpt
    hpt/lnx 1.9 2023-12-21

    When I try and compile SmapiNNTPd (git clone https://github.com/ftnapps/smapinntpd.git) I see:

    $ make linux
    make -f Makefile.linux
    make[1]: Entering directory '/tmp/smapinntpd/src'
    gcc -Wall -Wno-pointer-sign -DPLATFORM_LINUX -D__PROGPROT_H__ -c main.c -o main.o
    In file included from main.c:1:
    nntpserv.h:22:10: fatal error: smapi/msgapi.h: No such file or directory
    22 | #include <smapi/msgapi.h>
    | ^~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [Makefile.linux:37: main.o] Error 1
    make[1]: Leaving directory '/tmp/smapinntpd/src'
    make: *** [Makefile:15: linux] Error 2

    I've also downloaded smapi-2.2.4-src.tar.gz from https://sourceforge.net/projects/husky/ and extracted it to smapinntpd/src:

    $ ll smapi/msgapi.h
    -rw-r--r-- 1 ubuntu ubuntu 15K Feb 11 2003 smapi/msgapi.h
    $ ll smapi/progprot.h
    -rw-r--r-- 1 ubuntu ubuntu 2.9K Oct 25 2002 smapi/progprot.h


    Does anyone have any pointers as to how I can get this compiled & running?

    Jay

    ... Sure, I drink brake fluid. But I can stop anytime!
    --- GoldED+/W64-MSVC 1.1.5-b20180707
    * Origin: Northern Realms (1:229/664)
  • From fusion@1:120/616 to Jay Harris on Wed Jan 24 13:15:51 2024
    On 24 Jan 2024, Jay Harris said the following...

    I have hpt installed with DYNLIBS=1, PREFIX=/usr/local & LIBDIR=${PREFIX}/lib in huskymak.cfg.

    I had to add /usr/local/lib to /etc/ld.so.conf.d/your_lib.conf and then run sudo ldconfig to allow husky to run.

    eek, redhat-based distro perhaps?

    make[1]: Entering directory '/tmp/smapinntpd/src'
    gcc -Wall -Wno-pointer-sign -DPLATFORM_LINUX -D__PROGPROT_H__ -c main.c -o main.o
    In file included from main.c:1:
    nntpserv.h:22:10: fatal error: smapi/msgapi.h: No such file or directory
    22 | #include <smapi/msgapi.h>
    | ^~~~~~~~~~~~~~~~
    compilation terminated.

    strictly from a C standpoint not knowing about husky much.. typically you would build and install smapi separately if it's used this way.. it's not looking in the folder you think it is (but perhaps instead somewhere like /usr/local/include/smapi which might be it's post-install home)

    --- Mystic BBS v1.12 A47 2021/12/25 (Windows/32)
    * Origin: cold fusion - cfbbs.net - grand rapids, mi (1:120/616)
  • From Nicholas Boel@1:154/10 to Jay Harris on Wed Jan 24 17:02:40 2024
    On Wed, 24 Jan 2024 15:02:54 -0500, Jay Harris -> All wrote:

    I seem to be stuck trying to compile SmapiNNTPd.

    Does anyone have any pointers as to how I can get this compiled & running?

    Where are these located:

    libsmapi.a
    libsmapi.so
    libsmapi.so.2.5
    libsmapi.so.2.5.0

    If they aren't in /usr/local/lib, then you might need to make a symlink or point your LIBDIR in huskymak.cfg to where they actually are.

    Regards,
    Nick

    ... "Take my advice, I don't use it anyway."
    --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderb
    * Origin: _thePharcyde distribution system (Wisconsin) (1:154/10)
  • From Jay Harris@1:229/664 to Nicholas Boel on Wed Jan 24 18:31:34 2024
    On Wednesday January 24 2024, Nicholas Boel said the following...

    On Wed, 24 Jan 2024 15:02:54 -0500, Jay Harris -> All wrote:

    I seem to be stuck trying to compile SmapiNNTPd.

    Does anyone have any pointers as to how I can get this compiled &
    running?

    Where are these located:

    libsmapi.a
    libsmapi.so
    libsmapi.so.2.5
    libsmapi.so.2.5.0

    If they aren't in /usr/local/lib, then you might need to make a
    symlink or point your LIBDIR in huskymak.cfg to where they actually
    are.

    libsmapi.so & libsmapi.so.2.5 were already in /usr/local/lib as links. libsmapi.so.2.5.0 wasn't so I made a symbolic link for that one as well.

    libsmapi.a wasn't there either, I found it in ~/husky/smapi/Build & copied that over:

    /usr/local/lib$ ll
    total 684K
    lrwxrwxrwx 1 root root 26 Jan 17 09:07 libareafix.so -> libareafix.so.1.9.20231221*
    lrwxrwxrwx 1 root root 26 Jan 17 09:07 libareafix.so.1.9 -> libareafix.so.1.9.20231221*
    -r-xr-xr-x 1 root root 100K Jan 17 09:07 libareafix.so.1.9.20231221* lrwxrwxrwx 1 root root 27 Jan 17 09:07 libfidoconf.so -> libfidoconf.so.1.9.20230224*
    lrwxrwxrwx 1 root root 27 Jan 17 09:07 libfidoconf.so.1.9 -> libfidoconf.so.1.9.20230224*
    -r-xr-xr-x 1 root root 177K Jan 17 09:07 libfidoconf.so.1.9.20230224* lrwxrwxrwx 1 root root 25 Jan 17 09:07 libhptzip.so -> libhptzip.so.1.9.20230105*
    lrwxrwxrwx 1 root root 25 Jan 17 09:07 libhptzip.so.1.9 -> libhptzip.so.1.9.20230105*
    -r-xr-xr-x 1 root root 55K Jan 17 09:07 libhptzip.so.1.9.20230105*
    lrwxrwxrwx 1 root root 24 Jan 17 09:07 libhusky.so -> libhusky.so.1.9.20230224*
    lrwxrwxrwx 1 root root 24 Jan 17 09:07 libhusky.so.1.9 -> libhusky.so.1.9.20230224*
    -r-xr-xr-x 1 root root 77K Jan 17 09:07 libhusky.so.1.9.20230224*
    -rw-r--r-- 1 root root 160K Jan 24 18:26 libsmapi.a
    lrwxrwxrwx 1 root root 24 Jan 17 09:07 libsmapi.so -> libsmapi.so.2.5.20220123*
    lrwxrwxrwx 1 root root 24 Jan 17 09:07 libsmapi.so.2.5 -> libsmapi.so.2.5.20220123*
    lrwxrwxrwx 1 root root 26 Jan 24 18:28 libsmapi.so.2.5.0 -> ./libsmapi.so.2.5.20220123*
    -r-xr-xr-x 1 root root 100K Jan 17 09:07 libsmapi.so.2.5.20220123*
    drwxrwsr-x 3 root staff 4.0K Dec 29 19:51 ocaml/
    drwxr-xr-x 3 root root 4.0K Apr 20 2022 python3.10/

    $ set | grep LD_LIBRARY
    LD_LIBRARY_PATH=/usr/local/lib

    But still the same message about missing the smapi/msgapi.h file:

    /tmp/smapinntpd/src$ make linux
    make -f Makefile.linux
    make[1]: Entering directory '/tmp/smapinntpd/src'
    gcc -Wall -Wno-pointer-sign -DPLATFORM_LINUX -D__PROGPROT_H__ -c main.c -o main.o
    In file included from main.c:1:
    nntpserv.h:22:10: fatal error: smapi/msgapi.h: No such file or directory
    22 | #include <smapi/msgapi.h>
    | ^~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [Makefile.linux:37: main.o] Error 1
    make[1]: Leaving directory '/tmp/smapinntpd/src'
    make: *** [Makefile:15: linux] Error 2

    I notice that I have smapi 2.5 which doesn't include the smapi/progprot.h file also referenced in nntpserv.h, but it is there in the smapi-2.2.4-src.tar.gz archive I downloaded.


    Jay

    ... If you see an Apple Store get robbed does that make you an iWitness?
    --- GoldED+/LNX 1.1.5-b20231112
    * Origin: Northern Realms (1:229/664)
  • From Nicholas Boel@1:154/10 to Jay Harris on Wed Jan 24 21:40:42 2024
    On Thu, 25 Jan 2024 00:31:34 -0500, Jay Harris -> Nicholas Boel wrote:

    But still the same message about missing the smapi/msgapi.h file:

    /tmp/smapinntpd/src$ make linux
    make -f Makefile.linux
    make[1]: Entering directory '/tmp/smapinntpd/src'
    gcc  -Wall -Wno-pointer-sign -DPLATFORM_LINUX -D__PROGPROT_H__ -c main.c -o
    main.o
    In file included from main.c:1:
    nntpserv.h:22:10: fatal error: smapi/msgapi.h: No such file or directory
       22 | #include <smapi/msgapi.h>
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    make[1]: *** [Makefile.linux:37: main.o] Error 1
    make[1]: Leaving directory '/tmp/smapinntpd/src'
    make: *** [Makefile:15: linux] Error 2

    So I think what I did was I edited nntpserv.h and changed those two lines.

    #include "/home/user/src/husky/smapi/smapi/msgapi.h"
    #include "/home/user/src/husky/smapi/smapi/progprot.h"

    ... and it compiled. It may not be the best solution, but I had the same problems you did and when I got fed up I just started trying to point directly to files it was looking for. ;)

    I notice that I have smapi 2.5 which doesn't include the smapi/progprot.h file also referenced in nntpserv.h, but it is there in the smapi-2.2.4-src.tar.gz archive I downloaded.
    Funny thing I just noticed. I don't have progprot.h on my entire system, but changing that line to point directly to the smapi directory still worked. So maybe as long as it finds msgapi.h you're good to go. ;)

    Regards,
    Nick

    ... "Take my advice, I don't use it anyway."
    --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderb
    * Origin: _thePharcyde distribution system (Wisconsin) (1:154/10)
  • From Warpslide@1:229/664 to Nicholas Boel on Thu Jan 25 07:59:32 2024
    Nicholas Boel -> Jay Harris <1:154/10> wrote:

    So I think what I did was I edited nntpserv.h and changed those two lines.

    #include "/home/user/src/husky/smapi/smapi/msgapi.h"
    #include "/home/user/src/husky/smapi/smapi/progprot.h"

    This worked, thank you. I'm not sure why I didn't consider using absolute paths, but that was the solution.

    I was able to add in Carlos' MODE READER and UTF-8 patches, so if all went
    well this message should be sent using SmapiNNTPd with a proper UTF-8
    kludge from my iPhone.


    Jay

    --- NewsTap/5.5 (iPhone/iPod Touch)
    * Origin: Northern Realms (1:229/664)
  • From Tommi Koivula@2:221/10 to Warpslide on Thu Jan 25 20:32:58 2024
    Warpslide wrote:

    So I think what I did was I edited nntpserv.h and changed those
    two lines.

    #include "/home/user/src/husky/smapi/smapi/msgapi.h"
    #include "/home/user/src/husky/smapi/smapi/progprot.h"

    This worked, thank you. I'm not sure why I didn't consider using
    absolute paths, but that was the solution.

    I've got these files in /usr/local/include/smapi, but I have to confess that I cannot remember if I put them there by myself or not.. No need to edit nntpserv.h.

    tommi@mxo:/usr/local/include/smapi$ ll
    total 84
    -r--r--r-- 1 root root 9058 Sep 14 2021 api_jam.h
    -r--r--r-- 1 root root 3599 Sep 14 2021 api_sdmp.h
    -r--r--r-- 1 root root 1697 Sep 14 2021 api_sdm.h
    -r--r--r-- 1 root root 4448 Sep 14 2021 api_jamp.h
    -r--r--r-- 1 root root 16972 Sep 14 2021 msgapi.h
    -r--r--r-- 1 root root 5197 Sep 14 2021 api_sqp.h
    -r--r--r-- 1 root root 11077 Sep 14 2021 api_sq.h
    -r--r--r-- 1 root root 1096 Sep 14 2021 apidebug.h
    -r--r--r-- 1 root root 2368 Sep 14 2021 old_msg.h

    'Tommi

    --- Sylpheed 3.8.0beta1 (GTK+ 2.24.30; i686-pc-mingw32)
    * Origin: 2a01:4f9:c011:1ec5:f1d0:2:221:10 (2:221/10)
  • From Tommi Koivula@2:221/360 to Nicholas Boel on Thu Jan 25 22:36:25 2024
    On 25.1.2024 5:40, Nicholas Boel wrote:

    Funny thing I just noticed. I don't have progprot.h on my entire system,
    but changing that line to point directly to the smapi directory still
    worked. So maybe as long as it finds msgapi.h you're good to go. ;)

    Please take a look at Makefile.linux. Is progprot.h "optional"? :

    ===
    ifneq ($(wildcard progprot.h),)
    PLATFORMDEF = -DPLATFORM_LINUX
    else
    PLATFORMDEF = -DPLATFORM_LINUX -D__PROGPROT_H__
    endif
    ===

    'Tommi

    ---
    * Origin: nntp://rbb.fidonet.fi - Finland (2:221/360.0)
  • From Nicholas Boel@1:154/10 to Tommi Koivula on Thu Jan 25 16:45:30 2024
    On Fri, 26 Jan 2024 04:36:24 +0200, Tommi Koivula -> Nicholas Boel wrote:

    On 25.1.2024 5:40, Nicholas Boel wrote:

    Funny thing I just noticed. I don't have progprot.h on my entire system,
    but changing that line to point directly to the smapi directory still
    worked. So maybe as long as it finds msgapi.h you're good to go. ;)

    Please take a look at Makefile.linux. Is progprot.h "optional"? :

    ===
    ifneq ($(wildcard progprot.h),)
            PLATFORMDEF = -DPLATFORM_LINUX
    else
            PLATFORMDEF = -DPLATFORM_LINUX -D__PROGPROT_H__
    endif
    ===
    Seeing as though we are probably using the exact same Makefile.linux, yes. Yes it is. ;)

    Regards,
    Nick

    ... "Take my advice, I don't use it anyway."
    --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderb
    * Origin: _thePharcyde distribution system (Wisconsin) (1:154/10)
  • From Nicholas Boel@1:154/10 to Warpslide on Thu Jan 25 16:48:40 2024
    On Thu, 25 Jan 2024 13:59:32 -0500, Warpslide -> Nicholas Boel wrote:

    This worked, thank you.  I'm not sure why I didn't consider using absolute paths, but that was the solution.

    I was able to add in Carlos' MODE READER and UTF-8 patches, so if all went well this message should be sent using SmapiNNTPd with a proper UTF-8 kludge from my iPhone.


    Jay

    --- NewsTap/5.5 (iPhone/iPod Touch)
     * Origin: Northern Realms (1:229/664)

    Looks like it works just fine from my end. ;)

    FYI, all of the other patches you did to Jamnntpd, also work on Smapinntpd. Make sure to read the "Test" thread here started by Tommi, commenting out that one line seems to fix the FROM field in all newsreaders, including Thunderbird. ;)

    Regards,
    Nick

    ... "Take my advice, I don't use it anyway."
    --- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Thunderb
    * Origin: _thePharcyde distribution system (Wisconsin) (1:154/10)