skip to Main Content

I’m trying to build this: https://github.com/hselasky/hpsat_generate
this is their makefile:

PROG_CXX=hpsat_generate
PREFIX?=/usr/local
MAN=
SRCS=   hpsat_generate.cpp
BINDIR?=${PREFIX}/bin

.if defined(HAVE_DEBUG)
CFLAGS+= -g -O0
.endif

CFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib -lgmp -lgmpxx

.include <bsd.prog.mk>

using just make . results in

Makefile:7: *** missing separator.  Stop.

so after some searching I found that I need to use FreeBSD make, so I tried:
bmake . hpsat_generate
which complains that mergesort is not declared, which is a FreeBSD function so I can only assume it doesn’t really includes it.

I tried finding a way to make it run but I’m out of ideas..

2

Answers


  1. Instead of running the makefile just execute this:

    g++ -o sat sat.cpp -lgmp -lgmpxx -l:libbsd.a

    you may need to install the gmp and libbsd libraries

    Login or Signup to reply.
  2. The Makefile requires some changes for Linux (and NetBSD). The bsd.prog.mk implementation that comes with bmake on Linux is slightly off, and requires a workaround to link the program correctly, also, on Linux you need libbsd:

    These issues are fixed by PR #1.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search