# Upgrading 10.3 to 11.1



## Jeff Blank (Jul 24, 2017)

I have had a number of issues trying to get my 10.3-R installation upgraded to 11.x. I first had buildworld issues with 11.0-R, then different buildworld issues with 11.1-RC3, and now I'm having yet another issue with 11.1-R.

I started with an empty `/usr/src` and ran `svnup release` to fetch source. My `svnup.conf`:

```
[defaults]
work_directory=/var/tmp/svnup
#host=svn.freebsd.org
host=svn0.us-west.freebsd.org
#host=svn0.us-east.freebsd.org
#host=svn0.eu.freebsd.org
protocol=svn
verbosity=1
trim_tree=0
extra_files=0

[release]
branch=base/releng/11.1
target=/usr/src
```

End of `make buildworld` output follows. I've reformatted the failing `c++` command for forum readability.


```
>>> stage 3: cross tools
...
c++  -O2 -pipe -I/usr/obj/usr/src/tmp/usr/src/lib/clang/libclang
  -I/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvm
  -I/usr/src/contrib/llvm/tools/clang/include -I/usr/src/lib/clang/include
  -I/usr/src/contrib/llvm/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD
  -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG
  -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.1\"
  -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.1\"
  -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/tmp\" -ffunction-sections
  -fdata-sections -MD -MF.depend.Basic_SourceManager.o
  -MTBasic/SourceManager.o -Qunused-arguments
  -I/usr/obj/usr/src/tmp/legacy/usr/include  -std=c++11 -fno-exceptions
  -fno-rtti -stdlib=libc++ -Wno-c++11-extensions  -c
  /usr/src/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp -o
  Basic/SourceManager.o
/usr/src/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp:1190:10: fatal error: 'emmintrin.h' file not found
#include <emmintrin.h>
         ^
1 error generated.
*** [Basic/SourceManager.o] Error code 1

bmake[4]: stopped in /usr/src/lib/clang/libclang
1 error

(etc)
```

I'm aware that I can do a binary upgrade, but I really dislike the `freebsd-upgrade` config-merge functionality. `mergemaster` is much more to my liking. Are source upgrades still supported? Any ideas what the issue could be, stuff to try, etc?


```
FreeBSD crow 10.3-RELEASE-p20 FreeBSD 10.3-RELEASE-p20 #0: Wed Jul 12 03:13:07 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## SirDice (Jul 24, 2017)

Jeff Blank said:


> Are source upgrades still supported?


Of course they are.



> Any ideas what the issue could be, stuff to try, etc?


Before buildworld make sure to do a `make clean` so you have clean slate to start from. Also check /etc/make.conf and /etc/src.conf, if you get errors it's usually best to keep those two empty.


----------



## Jeff Blank (Jul 24, 2017)

SirDice said:


> Before buildworld make sure to do a `make clean` so you have clean slate to start from. Also check /etc/make.conf and /etc/src.conf, if you get errors it's usually best to keep those two empty.



Yep, should have mentioned that I empty /usr/obj every time I build.

My make.conf is a big `.if` block that only triggers in /usr/ports. I only have a couple of `WITHOUT_XXX` in src.conf that shouldn't affect the building of cross tools (I4B, IPFILTER, RCMDS). I renamed src.conf and make.conf to other filenames anyway and reran the build, same error.

Where should that emmintrin.h be coming from in the compile? I only have it in

```
/usr/src/contrib/gcc/config/i386/emmintrin.h
/usr/src/contrib/llvm/tools/clang/lib/Headers/emmintrin.h
```
I assume the latter is what it should be looking for, but I don't see that path with a `-I` flag in the compile command.


----------



## Jeckt (Jul 24, 2017)

I still upgrade from source, but use the src tarball as a base from the distribution servers.  This avoids the occasional source weirdness I'd occasionally get with something like SVN. With 11.1 Release due in two days, I'd consider waiting.


----------



## Jeff Blank (Sep 25, 2017)

finally got back to working on this, and it turns out my system is just halfways broken. under 9.3, it built 10.3 for that upgrade, but under 10.3, it can't even build 10.3 again. so I'm building 10.3 on a clean 10.3 VM to install on my broken system to see if that helps. I should be able to take this the rest of the way myself. thanks for all the advice.


----------

