# Can't use make -- help



## kr651129 (Feb 14, 2012)

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


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

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


```
# 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?


----------



## adamk (Feb 14, 2012)

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


----------



## kr651129 (Feb 14, 2012)

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.


----------



## kwa71 (May 4, 2019)

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


----------



## HL1234 (May 4, 2019)

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.


----------



## kwa71 (May 7, 2019)

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


----------



## kwa71 (May 8, 2019)

Gotcha!!!! I guess that has to do w the fact that FreeBSD 12 doesn't have 64-bit linux support!! --kwa71


----------



## zirias@ (May 8, 2019)

kr651129 said:


> 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:

```
# which make
/usr/bin/make

# which gmake
/usr/local/bin/gmake
```



HL1234 said:


> 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.



kwa71 said:


> does this mean you can compile the FreeBSD source tree with gmake?


No.


kwa71 said:


> 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


----------



## HL1234 (May 9, 2019)

kwa71 said:


> 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


----------



## zirias@ (May 9, 2019)

HL1234 said:


> "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).


----------



## HL1234 (May 9, 2019)

> 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?


----------



## SirDice (May 9, 2019)

HL1234 said:


> Linux on FreeBSD:
> kldstat | grep linux
> ...nothing
> I havend installed it yet. So it is possible to have a system without Linux support.


This has nothing to do with gmake(1) vs. make(1).


----------



## zirias@ (May 9, 2019)

HL1234 said:


> [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).


----------



## kwa71 (May 15, 2019)

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


----------



## SirDice (May 15, 2019)

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.


----------

