# Option STATIC conflicts with NLS (select only one) ??



## carsten (Feb 17, 2019)

Hi. I'm trying to install gcc on my 12.0 release and that's what I get:

```
cd /usr/ports/lang/gcc49 && make install clean
===>   gcc49-4.9.4_9 depends on file: /usr/local/bin/as - not found
===>  License GPLv3 LGPL3 accepted by the user
====> Two or more enabled options conflict with each other
=====> Option STATIC conflicts with NLS (select only one)
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/binutils
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/binutils
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/gcc49
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/gcc49
```

Could anyone help me ?


----------



## Bobi B. (Feb 17, 2019)

Well, seems like you'll have to choose either `STATIC`, or `NLS`. You can't have both.

Any specific reason for not doing `pkg install gcc49`?


----------



## olli@ (Feb 18, 2019)

carsten said:


> ```
> ===>   gcc49-4.9.4_9 depends on file: /usr/local/bin/as - not found
> ===>  License GPLv3 LGPL3 accepted by the user
> ====> Two or more enabled options conflict with each other
> ...


The important question is: Why have you enabled the STATIC option? Do you happen to have a `STATIC` setting in your environment or in /etc/make.conf? That's not a particularly good idea, I think.


----------



## carsten (Feb 18, 2019)

> ```
> # pkg install gmake
> /usr/local/lib/libssl.so.11: version OPENSSL_1_1_0 required by /usr/local/lib/libpkg.so.4 not defined
> ```





> I tried to reinstall openssl111 and /ports/security/openssl but it doesn't make any difference.





> ports-mgmt/pkg && make install clean doesnt work as well.


----------



## carsten (Feb 18, 2019)

make.conf:

```
CC = clang-devel
CPP = clang-cpp-devel
CXX = clang++-devel
CFLAGS += -stdlib=libc++
DEFAULT_VERSIONS+=ssl=openssl111

OPTIONS_UNSET+= GSSAPI_BASE
OPTIONS_SET+= GSSAPI_MIT
#OPENSSLBASE
#OPENSSLDIR="/usr/ports/security/openssl111

OPTIONS_UNSET=NLS

#CC=gcc49
#CXX=g++49
```


----------



## SirDice (Feb 18, 2019)

Rebuild port-mgmt/pkg, it's still linked to OpenSSL 1.1.0.

And remove these:

```
CC = clang-devel
CPP = clang-cpp-devel
CXX = clang++-devel
CFLAGS += -stdlib=libc++
```

And maybe reconsider these:

```
DEFAULT_VERSIONS+=ssl=openssl111
```
OpenSSL 1.1.1 is the default for 12.0 any way. 


```
root@hosaka:~ # openssl version
OpenSSL 1.1.1a-freebsd  20 Nov 2018
root@hosaka:~ # uname -a
FreeBSD hosaka.dicelan.home 12.0-STABLE FreeBSD 12.0-STABLE r344211 HOSAKA  amd64
```


----------



## carsten (Feb 18, 2019)

```
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (111 candidates): 100%
Processing candidates (111 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
# pkg install gcc
/usr/local/lib/libssl.so.11: version OPENSSL_1_1_0 required by /usr/local/lib/libpkg.so.4 not defined
#
```
also edited make.conf:

```
#CC = clang-devel
#CPP = clang-cpp-devel
#CXX = clang++-devel
#CFLAGS += -stdlib=libc++
#DEFAULT_VERSIONS+=ssl=openssl111
```


----------



## carsten (Feb 18, 2019)

```
cd /usr/ports/ports-mgmt/pkg && make install clean
.....
ln -s -f pkg.8  /usr/ports/ports-mgmt/pkg/work/stage/usr/local/man/man8/pkg-static.8
 /bin/mkdir -p '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/libdata/pkgconfig'
 install  -m 0644 libpkg/pkg.pc '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/libdata/pkgconfig'
====> Compressing man pages (compress-man)
===>  Installing for pkg-1.10.5_5
===>  Checking if pkg is already installed
===>   pkg-1.10.5_5 is already installed
      You may wish to [ICODE]make deinstall'' and install this port again
      by [/ICODE]make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of pkg
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make: stopped in /usr/ports/ports-mgmt/pkg



#:/usr/ports/ports-mgmt/pkg # make reinstall


===>  Installing for pkg-1.10.5_5
===>   Registering installation for pkg-1.10.5_5
*** Error code 70

Stop.
make[3]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/pkg
*** Error code 1

Stop.
make: stopped in /usr/ports/ports-mgmt/pkg
root@metus:/usr/ports/ports-mgmt/pkg #
```


----------



## talsamon (Feb 18, 2019)

The right command is `make deinstall reinstall clean`.


----------



## SirDice (Feb 19, 2019)

I suggest simply using packages. There's no reason to build from ports. 

`pkg-static upgrade`


----------



## carsten (Feb 19, 2019)

SirDice said:


> I suggest simply using packages. There's no reason to build from ports.
> 
> `pkg-static upgrade`


only reason i tried to use ports was broken pkg  running in circles here. I saw many similiar topics on forum, people having the same problem on 12.0. Is it really that hard to configure this system ? ;/


----------



## shkhln (Feb 19, 2019)

carsten said:


> broken pkg … I saw many similar topics on forum



Replace "many" with "none" and we have an agreement. Why don't you just describe your pkg problem here?


----------



## SirDice (Feb 19, 2019)

If I recall correctly there were some SSL issues between RC2 and RC3. This was due to an update of OpenSSL from 1.1.0 to 1.1.1. This caused some issues for a bunch of early adapters. But none of them were actually "major" issues and almost all of them were easily solved by proper upgrading. 

Try to fix pkg(8) first, using `pkg-static install -f pkg`. That _should_ work and fix your dependency issues with pkg(8) itself.

Also make sure you're actually on 12.0-RELEASE and not still on one of the release candidates.


----------



## carsten (Feb 20, 2019)

i give up. Gonna reinstall and try again. Thanks guys for Your help.


----------

