Re: Need some help with ports and rebuilding the world

2016-03-30 Thread Warren Block

On Wed, 30 Mar 2016, Aleksander Alekseev wrote:


CPUTYPE?=native
CFLAGS+=-O2 -pipe
CXXFLAGS+=-O2 -pipe



These will bite with no provocation, and prevent ports that want to
set their own flags from using them.


Frankly as a rule of thumb I prefer binary packages. But how would you
recommend to change these lines? You see if I use ports I would like
compiled code to be optimized and preferably for local CPU.


Don't set them at all, just remove those lines from make.conf.  Well, 
let me be more specific.  It is probably safe to set CPUTYPE, although 
choosing native has caused problems for me, where specifically setting a 
type like core-avx2 has been fine.


It is just the CFLAGS and CXXFLAGS that are best not set.  When not set, 
the world and kernel build will use safe defaults, but ports that can 
safely override those flags for better performance can do so.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Aleksander Alekseev
> Did you erase /usr/src before checking out -CURRENT?  Obsolete files 
> left in there can easily break things.  'svn stat /usr/src' will show 
> those files with a '?'.

I did. `svn stat /usr/src` outputs nothing and has return code 0.

> The first stages of buildworld build a copy of clang under /usr/obj,
> and the later stages use that, but specifying a full path the compiler
> defeats this mechanism.

That explains a lot, thanks.


For the record - I successfully upgraded both world and kernel to
CURRENT and everything seems to work normal so far. I will keep you in
touch.

Thanks a lot everyone for your help! 

>> CPUTYPE?=native
>> CFLAGS+=-O2 -pipe
>> CXXFLAGS+=-O2 -pipe  

> These will bite with no provocation, and prevent ports that want to
> set their own flags from using them.

Frankly as a rule of thumb I prefer binary packages. But how would you
recommend to change these lines? You see if I use ports I would like
compiled code to be optimized and preferably for local CPU. 

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Warren Block

On Tue, 29 Mar 2016, Aleksander Alekseev wrote:


Do you still have your old make.conf for comparison?


Sure. Current make.conf:

```
CPUTYPE?=native
CFLAGS+=-O2 -pipe
CXXFLAGS+=-O2 -pipe


These will bite with no provocation, and prevent ports that want to set 
their own flags from using them.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Warren Block

On Mon, 28 Mar 2016, Aleksander Alekseev wrote:


I think I realized what's going on. I probably rebuilded the world on
two different machines but forgot to do it on this one. I will
re-check this and report results a bit later.


OK, here is a problem. I can't upgrade the world because of compile
errors I mentioned before:

http://lpaste.net/948188758727983104

This issue reproduces with both CLang 3.6 and new CLang compiled
manually from trunk (I created symlinks clang++-3.9 and clang-cpp-3.9
to clang-3.9 and it solved my problem with CLang I mentioned before).


Did you erase /usr/src before checking out -CURRENT?  Obsolete files 
left in there can easily break things.  'svn stat /usr/src' will show 
those files with a '?'.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Dimitry Andric
On 29 Mar 2016, at 15:53, Aleksander Alekseev  wrote:
> 
>> For some reason, your build does not pick up the __alloc_size defines
>> from sys/cdefs.h.  You will have to figure out which cdefs.h your
>> build is including, and check whether that is in sync with the rest
>> of your source tree.
> 
> I removed CC, CXX and CPP lines from /etc/make.conf and it solved a
> problem. Still it's weird since cc (used now) and clang (explicitly
> specified before) supposed to be the same compiler:
> 
> $ clang --version
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> Target: x86_64-unknown-freebsd10.2
> Thread model: posix
> 
> $ cc --version
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> Target: x86_64-unknown-freebsd10.2
> Thread model: posix
> 
> In fact cc and clang look like a hardlink to the same file. Any ideas
> why one is capable of building the world and second is not?

It should not make any difference, at least on my systems it does not.
From what I saw from in other post, you specified the full path to clang
in CC, which you should not do for a regular buildworld.

The first stages of buildworld build a copy of clang under /usr/obj, and
the later stages use that, but specifying a full path the compiler
defeats this mechanism.

Note that Bryan Drewery is working on making this better, but for now,
just don't use full paths for CC, CXX and CPP in make.conf.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Aleksander Alekseev
> Do you still have your old make.conf for comparison?

Sure. Current make.conf:

```
CPUTYPE?=native
CFLAGS+=-O2 -pipe
CXXFLAGS+=-O2 -pipe
```

Old make.conf:

```
CC=/usr/bin/clang
CXX=/usr/bin/clang++
CPP=/usr/bin/clang-cpp
CPUTYPE?=native
CFLAGS+=-O2 -pipe
CXXFLAGS+=-O2 -pipe
```

Just re-checked link from one of my previous messages:

> ... but I got same errors using system clang 3.4.1:
> http://pastebin.com/raw/zz5UGsQV
> I'm at r297373 currently.

So I'm certain it was /usr/bin/clang and family. For the record
previously I always did ` sudo rm -rf /usr/obj ` before ` sudo time
make -j2 buildworld `. I use sudo for buildworld since /usr/src is
read-only for regular users.

> Also, what is your PATH environment variable set to?

$ echo $PATH
/home/eax/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/eax/bin

$ sudo env | grep PATH
Password:
PATH=/home/eax/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/eax/bin

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Michael Gmelin
On Tue, 29 Mar 2016 16:53:18 +0300
Aleksander Alekseev  wrote:

> > For some reason, your build does not pick up the __alloc_size
> > defines from sys/cdefs.h.  You will have to figure out which
> > cdefs.h your build is including, and check whether that is in sync
> > with the rest of your source tree.  
> 
> I removed CC, CXX and CPP lines from /etc/make.conf and it solved a
> problem. Still it's weird since cc (used now) and clang (explicitly
> specified before) supposed to be the same compiler:
> 
> $ clang --version
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032)
> 20140512 Target: x86_64-unknown-freebsd10.2
> Thread model: posix
> 
> $ cc --version
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032)
> 20140512 Target: x86_64-unknown-freebsd10.2
> Thread model: posix
> 
> In fact cc and clang look like a hardlink to the same file. Any ideas
> why one is capable of building the world and second is not?
> 

Do you still have your old make.conf for comparison? Also, what is your
PATH environment variable set to?

- Michael

-- 
Michael Gmelin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Aleksander Alekseev
> For some reason, your build does not pick up the __alloc_size defines
> from sys/cdefs.h.  You will have to figure out which cdefs.h your
> build is including, and check whether that is in sync with the rest
> of your source tree.

I removed CC, CXX and CPP lines from /etc/make.conf and it solved a
problem. Still it's weird since cc (used now) and clang (explicitly
specified before) supposed to be the same compiler:

$ clang --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix

$ cc --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix

In fact cc and clang look like a hardlink to the same file. Any ideas
why one is capable of building the world and second is not?

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Dimitry Andric
On 29 Mar 2016, at 11:38, Aleksander Alekseev  wrote:
> 
> OK, here is what I did so far.
> 
> First I booted with 10.2 kernel (it's always good to have a backup).
> Now I have 10.2 kernel and world. After that I installed clang38 using
> ports (and discovered a bug #208375 in a process).
> 
>> Don't try to build world with ports clang, it's not yet supported (at
>> least not officially, and without jumping through some flaming
>> hoops).
> 
> It explains a lot, thanks!
> 
>> Just use the compiler in the base system.
> 
> ... but I got same errors using system clang 3.4.1:
> 
> http://pastebin.com/raw/zz5UGsQV
> 
> I'm at r297373 currently.
> 
> Any ideas?

For some reason, your build does not pick up the __alloc_size defines
from sys/cdefs.h.  You will have to figure out which cdefs.h your build
is including, and check whether that is in sync with the rest of your
source tree.

If all else fails, delete your complete source tree, delete everything
in /usr/obj, and restart the build.  Also, in case settings in make.conf
or src.conf are causing trouble, start with an empty make.conf and
src.conf first, then add any settings one by one, to find the culprit.

-Dimitry




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Aleksander Alekseev
OK, here is what I did so far.

First I booted with 10.2 kernel (it's always good to have a backup).
Now I have 10.2 kernel and world. After that I installed clang38 using
ports (and discovered a bug #208375 in a process).

> Don't try to build world with ports clang, it's not yet supported (at
> least not officially, and without jumping through some flaming hoops).

It explains a lot, thanks!

> Just use the compiler in the base system.

... but I got same errors using system clang 3.4.1:

http://pastebin.com/raw/zz5UGsQV

I'm at r297373 currently.

Any ideas?

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-29 Thread Aleksander Alekseev
OK, here is what I did so far.

First I booted with 10.2 kernel (it's always good to have a backup).
Now I have 10.2 kernel and world. After that I installed clang38 using
ports (and discovered a bug #208375 in a process).

> Don't try to build world with ports clang, it's not yet supported (at
> least not officially, and without jumping through some flaming
> hoops).  

It explains a lot, thanks!

> Just use the compiler in the base system.  

... but I got same errors using system clang 3.4.1:

http://pastebin.com/raw/zz5UGsQV

I'm at r297373 currently.

Any ideas?

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-28 Thread Dimitry Andric
On 28 Mar 2016, at 16:00, Aleksander Alekseev  wrote:
> 
>> I think I realized what's going on. I probably rebuilded the world on
>> two different machines but forgot to do it on this one. I will
>> re-check this and report results a bit later.
> 
> OK, here is a problem. I can't upgrade the world because of compile
> errors I mentioned before:
> 
> http://lpaste.net/948188758727983104
> 
> This issue reproduces with both CLang 3.6 and new CLang compiled
> manually from trunk (I created symlinks clang++-3.9 and clang-cpp-3.9
> to clang-3.9 and it solved my problem with CLang I mentioned before).
> 
> Thoughts?

Don't try to build world with ports clang, it's not yet supported (at
least not officially, and without jumping through some flaming hoops).

Just use the compiler in the base system.

If all that doesn't work, your system is likely hosed, and reinstalling
from scratch is probably the easiest way to get back up to speed.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Need some help with ports and rebuilding the world

2016-03-28 Thread Gary Jennejohn
On Tue, 29 Mar 2016 00:42:09 +0200
Gary Jennejohn  wrote:

> On Mon, 28 Mar 2016 17:00:31 +0300
> Aleksander Alekseev  wrote:
> 
> > > I think I realized what's going on. I probably rebuilded the world on
> > > two different machines but forgot to do it on this one. I will
> > > re-check this and report results a bit later.
> > 
> > OK, here is a problem. I can't upgrade the world because of compile
> > errors I mentioned before:
> > 
> > http://lpaste.net/948188758727983104
> > 
> > This issue reproduces with both CLang 3.6 and new CLang compiled
> > manually from trunk (I created symlinks clang++-3.9 and clang-cpp-3.9
> > to clang-3.9 and it solved my problem with CLang I mentioned before).
> > 
> > Thoughts?
> >   
> 
> I see that you're using clang36 from ports.  Right now clang38 is
> what's being used in 11-CURRENT.  I don't know whether it will
> help, but you could try installing clang38 from ports.
> 

Oops, I see you already tried the latest clang.

Sorry, can't think of anything other than installing 11-CURRENT from
scratch.

-- 
Gary Jennejohn
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-28 Thread Gary Jennejohn
On Mon, 28 Mar 2016 17:00:31 +0300
Aleksander Alekseev  wrote:

> > I think I realized what's going on. I probably rebuilded the world on
> > two different machines but forgot to do it on this one. I will
> > re-check this and report results a bit later.  
> 
> OK, here is a problem. I can't upgrade the world because of compile
> errors I mentioned before:
> 
> http://lpaste.net/948188758727983104
> 
> This issue reproduces with both CLang 3.6 and new CLang compiled
> manually from trunk (I created symlinks clang++-3.9 and clang-cpp-3.9
> to clang-3.9 and it solved my problem with CLang I mentioned before).
> 
> Thoughts?
> 

I see that you're using clang36 from ports.  Right now clang38 is
what's being used in 11-CURRENT.  I don't know whether it will
help, but you could try installing clang38 from ports.

-- 
Gary Jennejohn
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-28 Thread Aleksander Alekseev
> I think I realized what's going on. I probably rebuilded the world on
> two different machines but forgot to do it on this one. I will
> re-check this and report results a bit later.

OK, here is a problem. I can't upgrade the world because of compile
errors I mentioned before:

http://lpaste.net/948188758727983104

This issue reproduces with both CLang 3.6 and new CLang compiled
manually from trunk (I created symlinks clang++-3.9 and clang-cpp-3.9
to clang-3.9 and it solved my problem with CLang I mentioned before).

Thoughts?

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-28 Thread Aleksander Alekseev
> It used to be FreeBSD 10.2 but I rebuilded and reinstall kernel and
> world from CURRENT according to Handbook instructions. I have exact
> steps recorded in case it would help. I hope such way of upgrading
> FreeBSD is correct?

I think I realized what's going on. I probably rebuilded the world on
two different machines but forgot to do it on this one. I will
re-check this and report results a bit later.

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-28 Thread Gary Jennejohn
On Mon, 28 Mar 2016 08:47:35 +0300
Aleksander Alekseev  wrote:

> > What's the output of these commands?:
> > 
> > freebsd-version
> > uname -r
> > uname -a
> > grep "define __FreeBSD_version" /usr/include/sys/param.h
> >   
> 
> $ freebsd-version
> 10.2-RELEASE
> 
> $ uname -r
> 11.0-CURRENT
> 
> $ uname -a
> FreeBSD portege 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r297287: Sat Mar
> 26 12:36:04 MSK 2016 root@portege:/usr/obj/usr/src/head/sys/GENERIC
> amd64
> 
> $ grep "define __FreeBSD_version" \
>   /usr/include/sys/param.h
> 
> #define __FreeBSD_version 1002000 /* Master, propagated to newvers */
> 
> It used to be FreeBSD 10.2 but I rebuilded and reinstall kernel and
> world from CURRENT according to Handbook instructions. I have exact
> steps recorded in case it would help. I hope such way of upgrading
> FreeBSD is correct?
> 

Looks like your kernel is based on 11-CURRENT but your world is
still 10.2.

Try looking at /usr/src/sys/sys/param.h.  If that contains 1100xxx
then you probably have to make buildworld followed by make installworld.

-- 
Gary Jennejohn
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-27 Thread Aleksander Alekseev
> What's the output of these commands?:
> 
> freebsd-version
> uname -r
> uname -a
> grep "define __FreeBSD_version" /usr/include/sys/param.h
> 

$ freebsd-version
10.2-RELEASE

$ uname -r
11.0-CURRENT

$ uname -a
FreeBSD portege 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r297287: Sat Mar
26 12:36:04 MSK 2016 root@portege:/usr/obj/usr/src/head/sys/GENERIC
amd64

$ grep "define __FreeBSD_version" \
  /usr/include/sys/param.h

#define __FreeBSD_version 1002000 /* Master, propagated to newvers */

It used to be FreeBSD 10.2 but I rebuilded and reinstall kernel and
world from CURRENT according to Handbook instructions. I have exact
steps recorded in case it would help. I hope such way of upgrading
FreeBSD is correct?

-- 
Best regards,
Aleksander Alekseev
http://eax.me/
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Need some help with ports and rebuilding the world

2016-03-27 Thread Michael Gmelin


On Sun, 27 Mar 2016 23:42:02 +0300
Aleksander Alekseev  wrote:

> Hello
> 
> I'm using FreeBSD CURRENT because of recent improvements in area of
> Intel GPUs support in this branch. Also there is a hope that by using
> CURRENT I can discover some bugs and contribute to FreeBSD project a
> bit by reporting them.
> 
> Today I noticed that I can't install anything from ports any longer:
> 
> ```
> $ cd /usr/ports/*/evince
> $ sudo make -DBATCH configure
> 
> make: "/usr/ports/Mk/bsd.port.mk" line 1162: UNAME_r (11.0-CURRENT)
> and OSVERSION (1002000) do not agree on major version number.
> ```
> 
> I thought that maybe something is wrong with portsnap or I did
> something wrong during one of `mergemaster` steps so I decided to
> rebuild the world. But now `make -j4 buildworld` fails with following
> errors:
> 
> http://lpaste.net/948188758727983104
> 
> Also I tried newer CLang (compiled manually from trunk branch) but it
> didn't manage to compile the world either - it complains about
> unresolved references during linking. I'm using ld.gold instead of ld,
> but since it links other projects without any problems I doubt it's
> his fault. My best guess is that it's because I specified clang-3.9 as
> CXX and CPP in /etc/make.conf. Unfortunately I didn't managed to find
> clang++-3.9 or clang-cpp-3.9 after running `ninja install`.
> 
> So I have two problems --- ports are not working and buildworld is
> failing. I have run out of ideas currently so a few advices would be
> appreciated.
> 

What's the output of these commands?:

freebsd-version
uname -r
uname -a
grep "define __FreeBSD_version" /usr/include/sys/param.h

- Michael

-- 
Michael Gmelin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"