Can't use make -- help

Anytime I try and use [CMD=]make[/CMD] in ports I get this

Code:
# make install clean
Makefile:24: *** missing separator.  Stop.

I doesn't matter what port it is, same story

Code:
# which make
/bin/make

# make --version
GNU Make 3.82
Built for x86_64-unknown-freebsd9.0
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Help?
 
Well you somehow managed to install GNU Make to /bin/make. On FreeBSD, that should not exist. The make you should be using is /usr/bin/make.

I hope, for your sake, that whatever you did to install GNU Make into /bin/ didn't do something else to break your system.

Adam
 
Hmm, well thanks! I still have /usr/bin/make and as long as I specifically say to use that then everything works fine. I'm ok with a broken system since I just made the switch to FreeBSD from Linux so a broken system means I get to learn something new.
 
Ok so we know which make to use to avoid the problem but what is the issue with the separator though? Is it just using the tab key vs. using a space key or what? --kwa71
 
We have attend in FreeBSD of
make is for building software from the ports. This is different as in Linux
gmake is for compiling software anywhere else. Installed from /usr/ports/devel/gmake But many ports also use it and it is probable already installed.

On my system:
ls -l /bin/make
ls: /bin/make: No such file or directory
for /usr/bin/make see
man make and
man 7 build

which gmake
/usr/local/bin/gmake
All self installed software goes to /usr/local/... This is different then on Linux and I had to learn this. But know I like it. It seperates the OS system from additional things what I do install.
 
Last edited:
Hi HL1234, does this mean you can compile the FreeBSD source tree with gmake? I didn't see that in the FreeBSD documentation. Thankx --kwa71
 
Gotcha!!!! I guess that has to do w the fact that FreeBSD 12 doesn't have 64-bit linux support!! --kwa71
 
Hmm, well thanks! I still have /usr/bin/make and as long as I specifically say to use that then everything works fine.
Then you obviously have make somewhere else in your path and this one is GNU make. Try which make to find out. I'd suggest you remove it, GNU make should only be called gmake on a BSD system.

With GNU make installed, it should look like this:
Code:
# which make
/usr/bin/make

# which gmake
/usr/local/bin/gmake

We have attend in FreeBSD of
make is for building software from the ports. This is different as in Linux
gmake is for compiling software anywhere else.
Huh? BSD make is different than GNU make and on a BSD system, the standard make is BSD make. They are still compatible on the most basic feature set. Still there is software that only builds with GNU make, that's why you can install it from ports/packages. The FreeBSD base and kernel on the other hand heavily use BSD make specific features, so they can't be built with GNU make. Therefore, GNU make should only ever be installed as gmake, to avoid any confusion.

does this mean you can compile the FreeBSD source tree with gmake?
No.
I guess that has to do w the fact that FreeBSD 12 doesn't have 64-bit linux support!!
What?
# uname -a
FreeBSD nexus 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 #0 r345984M: Fri Apr 26 19:59:29 CEST 2019 root@vmhost:/usr/obj/usr/src/amd64.amd64/sys/DESKTOP amd64

# kldstat | grep linux
41 4 0xffffffff82ded000 104f0 linuxkpi.ko
42 3 0xffffffff82dfe000 e220 linuxkpi_gplv2.ko
48 1 0xffffffff82e46000 39960 linux.ko
49 4 0xffffffff82e80000 2e28 linux_common.ko
50 1 0xffffffff82e83000 33c50 linux64.ko

Of course there's 64bit Linux support. But this has nothing to do with this thread :eek:
 
  • Like
Reactions: kfv
Hi HL1234, does this mean you can compile the FreeBSD source tree with gmake? I didn't see that in the FreeBSD documentation. Thankx --kwa71
Hi kwa71: sorry for the late answer, I just currently has seen the information mail from the forum. The answer is NO! inside the ports tree please use "make". A short command for doing build the software and all dependenties is: make install clean
make deinstall for deinstallation the port (the software of this port and all dependenties).
make reinstall for reinstall the port if it is allready installed and make install give an error because of that. There are some more possibilities.

"gmake": if you download any software as tarball *.gz etc.. that is not in the ports or because of special own requirements - and unpacked it elsewere in your filesystem, you have to use gmake for building it. But I never used that. I'm using the port system. That was one point why comeing from using Linux to FreeBSD. In Linux compiling the source I get everytime an error it is missing any dependency. I download the dependency and then again the dependency missed any another dependency and so on until it was a dependency I could not replace because of the rent Linux system form the ventor. I give up, rent an empty server and build my own system by installing FreeBSD. I'm happy now with that. I'm using FreeBSD as server system.
In the ports, if the software to comile is missing any dependency, the FreeBSD Makefile will automatic check that and install it for me, too. The "port maintainer is responsible for keeping the port up to date and making sure that it works correctly."

But if you have no special needs to change anything. See configuration of the port with make config, I recommend you only use packages. That is the easiest way to do anything. https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html
 
"gmake": if you download any software as tarball *.gz etc.. that is not in the ports or because of special own requirements - and unpacked it elsewere in your filesystem, you have to use gmake for building it.
No. Although a lot of software assumes GNU make, this isn't a general rule. Especially software using automake (from the GNU autotools) will generate a Makefile that works with any make. Please see my post above for detailed clarification.

Oh and on a side note: Please don't confuse the ports tree with the FreeBSD base (located in /usr/src).
 
They (GNU make , BSD make) are still compatible on the most basic feature set.
What means compatible - in configurations function yes, to build the software no. Look in a "makefile" of any downloaded software and in the Makefile - they are different. But I'm no experts for using gmake and writing, compiling and building software under Unix. So right, there could be more solutions.
Linux on FreeBSD:
kldstat | grep linux
...nothing
I havend installed it yet. So it is possible to have a system without Linux support. I have no desktop or client system. I don't not know why I have to use Linux support - for what?
 
[BSD vs GNU make] What means compatible
As I wrote, on the most basic feature set. This means it's quite possible to write a Makefile only using features that are the same in both flavors of "make". That's exactly what "automake" does automatically. And then please, try to read and understand what was already written (or, of course, ask about things that aren't clear to you).
 
Hi HL1234, I guess it all boils down to the naming conventions used in FreeBSD: gmake vs. make: gcc4 vs. gcc and rpm4 vs rpm. I would think it would be a more robust system if linux were to be incorported with FreeBSD that's why I would want linux 64-bit support under Unix. Esp. due to the afore mentioned naming convention issue.

Although, please forgive my persistence, but we still haven't addressed how to solve the error encountered by make regarding a missing separator.
Thanx --kwa71
 
The original question is 7 years old and appears to have been caused by someone, accidentally or deliberately, copying gmake(1) to /bin/make. The file formats of a Makefile for GNU's gmake(1) and BSD's make(1) is slightly different, causing the error.
 
Back
Top