Problems with Ports


#1

Hi Guys

I am pretty new to TrueOS/BSD. Running 2017-02-09

I was originally trying to get the Nano editor installed via the ports collection, this is what I have done/tried

portsnap fetch extract update
cd /usr/ports/editors/nano
make install clean

I get the error C compiler cannot create executables.

I was mucking around, trying to get other programs installed, all give the same error, so it looks like I am missing something, but I have been unable to determine what I am missing

Any thoughts?

Thanks in advance
Tim


#2

I’m not sure if this still valid advice, but I remember someone mentioning NOT to use ports, and use either pkg or appcafe under sysadm to install packages.


#3

The error should be telling you something like “…install llvm39…”. The basic problem is there’s no compiler installed.
Now that said, the TrueOS ports repo is over on GitHUB, not the FreeBSD ports servers. The TrueOS ports tree is modified from the FreeBSD base: it has OpenRC changes, pulls in changes from the FreeBSD graphics stack plus more. So if your ports directory was setup against FreeBSD, you’re not going to be happy with anything built.
TrueOS also builds ports (maybe the whole system) against LibreSSL intead of OpenSSL, so there are make config changes you’ll want.

As pointed out by @Groot it’s simpler to pull down the binary package and install that. Fire up the sysadm-client, app cafe, search for Nano and install.


#4

must not be used. A previous edition of the guide cautioned against its use. I don’t know why the caution was removed.


#5

https://www.trueos.org/handbook/using.html#freebsd-ports says:

When fetching ports for the first time:

# git clone http://github.com/trueos/freebsd-ports.git /usr/ports

To update an existing local ports directory:

# cd /usr/ports
# git pull

So it’s different from PCBSD times but it looks like it still does not matter whether you install by AppCafé, via pkg on the CLI or from ports. Updates work, no matter what install option you chose. Only with ports you can build with specific options, but then you have to update all applications manually. That is how I understand it, please correct me if I am wrong.


#6

Building ports yourself will let you choose specific options; I’m not sure if normal updates overwrite your built port; if you search the forum, there was a thread on this and one of the devs had input.

The biggest thing to keep in mind is the source of your ports tree. TrueOS uses a modified tree, you need to clone it from github. I’m not sure which is the correct branch to follow, master or xserver-next. I think xserver-next is the branch you want because that should have the “drm” graphics work with the OpenRC changes on top. One of the devs should be able to tell us.

What you probably don’t want to do is portsnap a ports tree from a FreeBSD server and try and use that. Some of ports may build and work fine, but not everything will.


#7

OK, cool thanks, I will just stay away from the ports. I can just use the pkg manager. That was pretty simple to install nano

Just learning as I go along, l appreciate all the comments :wink: