pkg vs. ports

Can I use pkgng to install a port such as multimedia/mlt without wrecking the rest of my system?

I want to install some video editors but they all want multimedia/mlt which fails to build under CLANG / FreeBSD 10-stable

So I thought I might risk installing multimedia/mlt with pkg but it wants to reinstall about thirty of my existing ports...

I don't know what options have or have not been set in those thirty ports it wants to replace my ports with, is there any way of getting it to install mlt without an excessive lose of control of one's system?
 
daeron said:
Can I use pkgng to install a port such as multimedia/mlt without wrecking the rest of my system?

I want to install some video editors but they all want multimedia/mlt which fails to build under CLANG / FreeBSD 10-stable
You can often get over that error adding the following to /etc/make.conf and /etc/src.conf before attempting to make the / a port.
make.conf:
Code:
WITHOUT_CLANG=true
FAVORITE_COMPILER=gcc

src.conf:
Code:
WITHOUT_CLANG=true

If you want to stick with Clang. You will want to remove, or comment those lines after you have finished building / installing the offending port(s).

--Chris
 
I'm not suggesting this as a default. But rather, as a stop-gap, until the port in question is working with Clang.
In other words. Only for, or in ports that fail to build, or install with Clang.

--Chris
 
Easier to just change the port to use GCC from ports, if that's the problem. But don't pull the rug out from under the operating system by removing the base compiler.
 
Maybe I don't understand completely. But knowing Clang is the default. Can't exceptions be made on a port-by-port basis. Meaning;
This port bombed with Clang, insert lines in make.conf(5), and src.conf(5), try again. Success. OK remove, or comment lines in /etc/make.conf, and /etc/src.conf. Now I'm biulding/installing with Clang again.

Am I still off / not getting it?

--Chris

EDIT: This works famously on releng_9. But I know you're (we're) talking 10. here.
EDIT2: I guess it goes without saying, that sending a pr(1) would be prudent. :)
 
src.conf is about the base system. Entering WITHOUT_CLANG=yes there will prevent Clang from being built during a buildworld (although it won't delete the old version). Don't do that, buildworld will fail. Ask me how I know. :\

And that will not help with the port. /etc/make.conf can be modified to check if it is in a port directory and use a specific compiler, but I've never bothered with that. The port Makefile can be changed with
Code:
USES=gcc

But it might require a specific version of GCC.
 
OK. Fair enough. It was overkill.
Maybe simply make the port via
Code:
make -DWITHOUT_CLANG
would be a bit more "on target". :)

--Chris
 
The supported way to make a port to use GCC instead of the default CLANG as the C/C++ compiler is to use the USES=compiler setting in the Makefile of the port. From /usr/ports/Mk/Uses/compiler.mk:

Code:
# Feature:      compiler
# Usage:        USES=compiler or USES=compiler:ARGS
# Valid ARGS:   env (default, implicit) c++0x c++11-lib c++11-lang c11 openmp nestedfct features
#
# c++0x:        The port needs a compiler understanding C++0X
# c++11-lang:   The port needs a compiler understanding C++11
# gcc-c++11-lib:The port needs g++ compiler with a C++11 library
# c++11-lib:    The port needs a compiler understanding C++11 and with a C++11 ready standard library
# c11:          The port needs a compiler understanding C11
# openmp:       The port needs a compiler understanding openmp
# nestedfct:    The port needs a compiler understanding nested functions
# features:     The port will determine the features supported by the default compiler

Edit: You also have to set USE_GCC=yes in the Makefile it seems. The USES=compiler doesn't yet have a capability of forcing the use of GCC. This bit of the porter's handbook is still probably up to date, section 5.8.8 USE_*:

http://www.freebsd.org/doc/en/books/porters-handbook/makefile-depend.html
 
Thanks all, and the prize goes to @kpa who was 90% correct.

I'd been modifying make.conf too, and without success. I patiently tried each suggestion using make.conf and they all produced the same result. Trying USE_GCC also failed.

Inserting USES=gcc {or in this case adding gcc to the list} in the Makefile worked.
 
Last edited by a moderator:
Right you are. I call foul!
Would the previous recipient of the prize, kindly relinquish that prize to it's rightful owner; @wblock@.

--Chris
 
Last edited by a moderator:
Back
Top