• Compiling source in Linux

    From Recon #1@126.Wwivnet@11:1/101 to All on Fri Oct 11 18:19:27 2024

    Hey all,

    So I am able to setup Linux to compile and use updated source code just fine, however I'm not very good with simlinks, and do not seem to get it to work using the instructions in docs for various reason being either I'm not running my WWIV in /opt/wwiv or I'm missing a step in where the binaries are to be placed when done. As a result when I compile I find myself having to dig for each and manually mv or cp them to my /dedicated/wwiv directory.

    Does someone have a simple way they compile and locate binaries without using simlinks? I realize it may be a few of the .sh scripts that may require simple fixes, however I am not sure. I prefer to download the .zip of the latest source, compile, and then move the binaries over. I guess I'm old school that way ...

    |11R|153|11C|110|11N
    p
    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Xenos #1@60.Wwivnet@11:1/101 to Recon #1 on Sat Oct 12 10:21:31 2024

    On Saturday,October 12, 2024 at 06:19 AM, Recon wrote:

    So I am able to setup Linux to compile and use updated source code just fine, however I'm not very good with simlinks, and do not seem to get it
    to work using the instructions in docs for various reason being either
    I'm not running my WWIV in /opt/wwiv or I'm missing a step in where the binaries are to be placed when done. As a result when I compile I find myself having to dig for each and manually mv or cp them to my /dedicated/wwiv directory.

    Does someone have a simple way they compile and locate binaries without using simlinks? I realize it may be a few of the .sh scripts that may require simple fixes, however I am not sure. I prefer to download the
    .zip of the latest source, compile, and then move the binaries over. I guess I'm old school that way ...


    What directory do you build in?
    What directory is your BBS root?

    -x


    A .-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
    /*\ | /\liens' /\lcove! WWIV on Linux, Taguig, Metro Manila, Philippines |
    / v \`-=-=-=-=-=-=-=-=-=-=-=-[ WWIV Development ]-=-=--=-=-=-=-=-=-=-=-=-=-'

               
    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Rushfan #1@513.Wwivnet@11:1/101 to Recon #1 on Sat Oct 12 12:38:02 2024


    Does someone have a simple way they compile and locate binaries without using simlinks? I realize it may be a few of the .sh scripts that may require simple fixes, however I am not sure. I prefer to download the
    .zip of the latest source, compile, and then move the binaries over. I guess I'm old school that way ...

    Just cp the files over instead of a symlink.

    Let's assuming the wwiv is built in $HOME/git/wwiv/_build

    export BUILT_BIN=$HOME/git/wwiv/_build
    cp $BUILT_BIN/bbs/bbs .
    cp $BUILD_BIN/wwivd/wwivd
    ...

    depending on what you change you only copy of the binaries you change, I usually am only changing one thing at a time.

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Recon #1@126.Wwivnet@11:1/101 to Xenos #1 on Sun Oct 13 15:54:10 2024

    I'm running the latest Linux Mint and the directory is /home/git/wwiv/_build
    I was running Ubuntu but switched back to Mint recently. I'm not even sure if my new source is compiling as I'm getting Ninja Build errors 2/3 of the way in on the build. It seems to catch at

    /home/git/wwiv/sdk/ansi/makeansi.cpp:54:22: error: ansi_color_map was not declared in this scope 54 | addto(&out, 40 + ansi_color_map[(attr & 0x70) >> 4] - '0'); | ^~~~~~~~~~~~~~ninja: build stopped: subcommand failed.

    FAILED: sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o

    I just followed the instructions here: https://github.com/wwivbbs/wwiv#building-on-linux

    And used /builds/linux/install-prereqs.sh as a fail safe but prior installed any prereqs as listed on the github page.

    With that said, I haven't tried recently to copy source, but did just refresh my fork and pulled the latest source, and attempted to compile. I see RushFan also replied, but have not tried his instructions on copying just yet as I think I'm not setup right.


    On Saturday,October 12, 2024 at 10:21 AM, Xenos wrote:

    RE: Re: Compiling source in Linux
    BY: Recon #1 @126

    On Saturday,October 12, 2024 at 06:19 AM, Recon wrote:

    So I am able to setup Linux to compile and use updated source
    code just
    fine, however I'm not very good with simlinks, and do not seem
    to get it
    to work using the instructions in docs for various reason being
    either
    I'm not running my WWIV in /opt/wwiv or I'm missing a step in
    where the
    binaries are to be placed when done. As a result when I
    compile I find
    myself having to dig for each and manually mv or cp them to my /dedicated/wwiv directory.

    Does someone have a simple way they compile and locate binaries
    without
    using simlinks? I realize it may be a few of the .sh scripts
    that may
    require simple fixes, however I am not sure. I prefer to
    download the
    .zip of the latest source, compile, and then move the binaries
    over. I
    guess I'm old school that way ...


    What directory do you build in?
    What directory is your BBS root?

    -x

    ♦1
    ♦2 A .-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    ♦3 /*\ | /\liens' /\lcove! WWIV on Linux, Taguig, Metro
    Manila, Philippines |
    ♦4/ v \`-=-=-=-=-=-=-=-=-=-=-=-[ WWIV Development ]-=-=--=-=-=-=-=-=-=-=-=-=-'
    ♦5

    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Recon #1@126.Wwivnet@11:1/101 to Rushfan #1 on Sun Oct 13 15:57:07 2024

    Thanks Rush, yes that is how I have been doing it, however when you or someone makes updates to the source overall, is when it can take time locating and copying all binaries over. For instance, if I wanted a clean compile on the latest version of all binaries copied over.
    On Saturday,October 12, 2024 at 12:38 PM, Rushfan wrote:

    RE: Re: Compiling source in Linux
    BY: Recon #1 @126

    Does someone have a simple way they compile and locate binaries
    without
    using simlinks? I realize it may be a few of the .sh scripts
    that may
    require simple fixes, however I am not sure. I prefer to
    download the
    .zip of the latest source, compile, and then move the binaries
    over. I
    guess I'm old school that way ...

    Just cp the files over instead of a symlink.

    Let's assuming the wwiv is built in $HOME/git/wwiv/_build

    export BUILT_BIN=$HOME/git/wwiv/_build
    cp $BUILT_BIN/bbs/bbs .
    cp $BUILD_BIN/wwivd/wwivd
    ...

    depending on what you change you only copy of the binaries you change, I usually am only changing one thing at a time.

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Rushfan #1@513.Wwivnet@11:1/101 to Recon #1 on Sun Oct 13 20:26:48 2024


    /home/git/wwiv/sdk/ansi/makeansi.cpp:54:22: error: ansi_color_map was
    not declared in this scope 54 | addto(&out, 40 +
    ansi_color_map[(attr & 0x70) >> 4] - '0'); | ^~~~~~~~~~~~~~ninja: build stopped: subcommand failed.


    That seems like something else is going on, that array is defined on line 36 (and also referenced on line 51 and others). Was there any other error that is messing up the compiler?

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Recon #1@126.Wwivnet@11:1/101 to Rushfan #1 on Mon Oct 14 17:51:20 2024

    I think so, yes. Can you refresh my memory on what I delete to rerun it, all in _build? I think so, but just want to be sure I'm not over killing it. I will note every error next time. At the moment it is stuck on this one.

    On Sunday,October 13, 2024 at 08:26 PM, Rushfan wrote:

    RE: Re: Compiling source in Linux
    BY: Recon #1 @126

    /home/git/wwiv/sdk/ansi/makeansi.cpp:54:22: error: ansi_color_map was
    not declared in this scope 54 | addto(&out, 40 + ansi_color_map[(attr & 0x70) >> 4] - '0'); |

    ^~~~~~~~~~~~~~ninja: build stopped: subcommand failed.


    That seems like something else is going on, that array is defined on
    line 36 (and also referenced on line 51 and others). Was there any
    other error that is messing up the compiler?

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Rushfan #1@513.Wwivnet@11:1/101 to Recon #1 on Mon Oct 14 20:49:50 2024


    I think so, yes. Can you refresh my memory on what I delete to rerun
    it, all in _build? I think so, but just want to be sure I'm not over killing it. I will note every error next time. At the moment it is
    stuck on this one.


    Yes, you could delete the _build directory and then re-run cmake commands (from the readme)

    mkdir _build
    cd _build
    ../cmake-config.sh
    cmake --build .



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Recon #1@126.Wwivnet@11:1/101 to Rushfan #1 on Tue Oct 15 19:38:04 2024

    So I deleted the previous _build and attempted another compile. Here are the two places I notice fails. I tried running ./cmake --build . a couple of times to see if it would get past this but it consistently doesn't like something here. Looking at the first error, do I have a dependancy not installed that is needed for the newer kernal/version of Ubuntu / Linux Mint?


    Ok first error during ../cmake-config.sh

    -- Platform: Linux-- CMAKE_BUILD_TYPE not set; defaulting to Debug-- Performing Test HAVE_FLAG_ADDRESS_SANITIZER-- Performing Test HAVE_FLAG_ADDRESS_SANITIZER - Failed

    Next with cmake --build . from within /home/git/wwiv/_build

    0
    /home/git/wwiv/common/input.cpp:495:16: warning: enumeration value PHONE not handled in switch [-Wswitch][323/525] Building CXX object sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.oFAILED:
    sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o /usr/bin/c++ -DFMT_HEADER_ONLY=1 -D_DEBUG -I/home/git/wwiv -isystem /home/git/wwiv/_build/vcpkg_installed/x64-linux/include -g -std=gnu++17 -Wall -Wextra -MD -MT sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o -MF sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o.d -o sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o -c /home/git/wwiv/sdk/ansi/makeansi.cpp/home/git/wwiv/sdk/ansi/makean si.cpp: In function std::string wwiv::sdk::ansi::makeansi(int, int):/home/git/wwiv/sdk/ansi/makeansi.cpp:36:16: error: uint8_t does not name a type 36 | static const uint8_t ansi_color_map[] = {'0', '4', '2', '6', '1', '5', '3', '7'}; | ^~~~~~~/home/git/wwiv/sdk/ansi/makeansi.cpp:22:1: note: uint8_t is defined in header <cstdint>; did you forget to #include <cstdint>? 21 | #include <vector> +++ |+#include <cstdint> 22 | /home/git/wwiv/sdk/ansi/makeansi.cpp:46:22: error: ansi_color_map was not declared in this scope 46 | addto(&out, 30 + ansi_color_map[attr & 0x07] - '0'); | ^~~~~~~~~~~~~~/home/git/wwiv/sdk/ansi/makeansi.cpp:51:22: error: ansi_color_map was not declared in this scope 51 | addto(&out, 30 + ansi_color_map[attr & 0x07] - '0'); | ^~~~~~~~~~~~~~/home/git/wwiv/sdk/ansi/makeansi.cpp:54:22: error: ansi_color_map was not declared in this scope 54 | addto(&out, 40 + ansi_color_map[(attr & 0x70) >> 4] - '0'); | ^~~~~~~~~~~~~~[340/525] Building CXX object sdk/CMakeFiles/sdk.dir/subxtr.cpp.oninja: build stopped: subcommand failed.

    On Monday,October 14, 2024 at 08:49 PM, Rushfan wrote:

    RE: Re: Compiling source in Linux
    BY: Recon #1 @126

    I think so, yes. Can you refresh my memory on what I delete to rerun
    it, all in _build? I think so, but just want to be sure I'm not over killing it. I will note every error next time. At the moment it is stuck on this one.


    Yes, you could delete the _build directory and then re-run cmake
    commands (from the readme)

    mkdir _build
    cd _build
    ../cmake-config.sh
    cmake --build .



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Rushfan #1@513.Wwivnet@11:1/101 to Recon #1 on Wed Oct 16 09:51:00 2024


    RE: Re: Compiling source in Linux

    I just logged an issue on this.


    Try adding this:

    #incude <cstdint>

    before this line:

    #include <string>

    Let me know if that fixes it.

    I logged the following on github:

    https://github.com/wwivbbs/wwiv/issues/1632

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Recon #1@126.Wwivnet@11:1/101 to Rushfan #1 on Wed Oct 16 18:19:54 2024

    Ok so the first time I added #include <cstdint> to input.cpp (I don't recall why, I'm tired, but think I saw it below as one of the problem childs..) That produced the below fail. Then I added the same to /home/git/wwiv/sdk/ansi/makeansi.cpp and it compiled without error. I suppose the question will be if I need to go back and remove tcstdint from input.cpp, I can't imagine it hurts being there?

    Thanks RushFan.

    [323/525] Building CXX object sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.oFAILED: sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o
    /usr/bin/c++ -DFMT_HEADER_ONLY=1 -D_DEBUG -I/home/git/wwiv -isystem /home/git/wwiv/_build/vcpkg_installed/x64-linux/include -g -std=gnu++17 -Wall -Wextra -MD -MT sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o -MF sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o.d -o sdk/CMakeFiles/sdk.dir/ansi/makeansi.cpp.o -c /home/git/wwiv/sdk/ansi/makeansi.cpp/home/git/wwiv/sdk/ansi/makeansi.cpp : In function std::string wwiv::sdk::ansi::makeansi(int, int):/home/git/wwiv/sdk/ansi/makeansi.cpp:36:16: error: uint8_t does not name a type 36 | static const uint8_t ansi_color_map[] = {'0', '4', '2', '6', '1', '5', '3', '7'}; | ^~~~~~~/home/git/wwiv/sdk/ansi/makeansi.cpp:22:1: note: uint8_t is defined in header <cstdint>; did you forget to #include <cstdint>? 21 | #include <vector> +++ |+#include <cstdint> 22 | /home/git/wwiv/sdk/ansi/makeansi.cpp:46:22: error: ansi_color_map was not declared in this scope 46 | addto(&out, 30 + ansi_color_map[attr & 0x07] - '0'); | ^~~~~~~~~~~~~~/home/git/wwiv/sdk/ansi/makeansi.cpp:51:22: error: ansi_color_map was not declared in this scope 51 | M ;:M#;: addto(&out, 30 + ansi_color_map[attr & 0x07] - '0'); | ^~~~~~~~~~~~~~/home/git/wwiv/sdk/ansi/makeansi.cpp:54:22: error: ansi_color_map was not declared in this scope 54 | addto(&out, 40 + ansi_color_map[(attr & 0x70) >> 4] - '0'); | ^~~~~~~~~~~~~~[340/525] Building CXX object sdk/CMakeFiles/sdk.dir/subxtr.cpp.oninja: build stopped: subcommand failed.



    On Wednesday,October 16, 2024 at 09:51 AM, Rushfan wrote:

    RE: Re: Compiling source in Linux
    BY: Recon #1 @126

    RE: Re: Compiling source in Linux

    I just logged an issue on this.


    Try adding this:

    #incude <cstdint>

    before this line:

    #include <string>

    Let me know if that fixes it.

    I logged the following on github:

    https://github.com/wwivbbs/wwiv/issues/1632

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Rushfan #1@513.Wwivnet@11:1/101 to Recon #1 on Wed Oct 16 23:44:45 2024


    Ok so the first time I added #include <cstdint> to input.cpp (I don't
    recall why, I'm tired, but think I saw it below as one of the problem childs..) That produced the below fail. Then I added the same to
    childs..) /home/git/wwiv/sdk/ansi/makeansi.cpp and it compiled without childs..) error. I suppose the question will be if I need to go back childs..) and remove tcstdint from input.cpp, I can't imagine it hurts childs..) being there?

    It doesn't hurt. Sounds like the GCC build there is more pedantic, including it is good. I'll check in a change to put it in both input.cpp and also makeansi.cpp

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Recon #1@126.Wwivnet@11:1/101 to Rushfan #1 on Thu Oct 17 20:49:22 2024

    Yes the gcc build is, I'm not sure "how" but if you look at the linux setup for Mystic, that is likely the reason. So if any WWIV SysOp also runs Mystic on Linux they *might* run into this issue if the gcc build is the culprit.

    Thanks for your help with this though. Now I'll play with simlinks on my test system until I get that part right ;)



    On Wednesday,October 16, 2024 at 11:44 PM, Rushfan wrote:

    RE: Re: Compiling source in Linux
    BY: Recon #1 @126

    Ok so the first time I added #include <cstdint> to input.cpp (I don't recall why, I'm tired, but think I saw it below as one of the problem childs..) That produced the below fail. Then I added the same to childs..) /home/git/wwiv/sdk/ansi/makeansi.cpp and it compiled
    without
    childs..) error. I suppose the question will be if I need to go back childs..) and remove tcstdint from input.cpp, I can't imagine
    it hurts
    childs..) being there?

    It doesn't hurt. Sounds like the GCC build there is more pedantic, including it is good. I'll check in a change to put it in both input.cpp
    and also makeansi.cpp

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)