Menu

Building v1.15 on FreeBSD 14

Help
carl
2024-03-06
2024-03-06
  • carl

    carl - 2024-03-06

    I'm trying to build v1.15 on FreeBSD and I'm failing miserably.
    I have no idea what I'm doing in FreeBSD.

    user@bsd14VM:~/ncid $ make freebsd
    make: "/home/user/ncid/Makefile" line 117: Invalid line type
    make: "/home/user/ncid/Makefile" line 127: Invalid line type
    make: "/home/user/ncid/Makefile" line 139: Invalid line type
    make: "/home/user/ncid/Makefile" line 151: Invalid line type
    make: Fatal errors encountered -- cannot continue
    make: stopped in /home/user/ncid

    Seems to me like it doesn't like the conditionals, that are trying to figure out if I'm on a Mac (which I'm not) or not. Maybe?

    ifeq ($(UNAME_S),Darwin)
        # Macintosh compiler
        # if CC and CXX changed, also change Makefiles in gateway, server, tools
        CC       = gcc
        CXX      = g++ -std=c++17
    
        MFLAGS   = -Wall -Wmissing-declarations -Wuninitialized \
                   -Wsign-compare
    
        MAKE     = gmake
    else ifeq ($(UNAME_S),FreeBSD)
        MAKE     = gmake
        CC       = cc
        CXX      = c++
    
        # full RELRO options
        RFLAGS   = -Wl,-z,relro,-z,now
    
        # global additions to CFLAGS
        MFLAGS   = -Wmissing-declarations -Wunused-variable -Wparentheses \
                   -Wreturn-type -Wuninitialized -Wsign-compare \
                   -Wformat -Wformat-zero-length
    else
        CC       = gcc
        CXX      = g++
    
        # full RELRO options
        RFLAGS   = -Wl,-z,relro,-z,now
    
        # global additions to CFLAGS
        MFLAGS   = -Wmissing-declarations -Wunused-variable -Wparentheses \
                   -Wreturn-type -Wuninitialized -Wsign-compare \
                   -Wformat -Wformat-zero-length -Wno-stringop-truncation \
                   # -Wformat-overflow
    endif
    
     
  • Ed Attfield

    Ed Attfield - 2024-03-06

    You should be using gmake instead of make.
    Instructions for freebsd are in the User Manual at https://ncid.sourceforge.io/doc/NCID-UserManual.html

     

Log in to post a comment.