# synth prepare-system question



## LJackson (Nov 7, 2016)

So, as a `synth` newbie, I figured one of the safer ways to invoke it is `synth prepare-system`. My question is once this completes sucessfully do I just run `pkg upgrade`? Or, are some extra parameters needed?


----------



## marino (Nov 7, 2016)

if /usr/local/etc/pkg/repos/00_synth.conf exists already, you can just run `pkg upgrade -r Synth` directly.
If not, you can always run `synth upgrade-system` which will analyze the system and just start installing as all the packages will be up-to-date.  After that point, the 00_synth.conf file will exist.


----------



## LJackson (Nov 8, 2016)

A followup question, as `synth` is cleaning up after the `synth upgrade-system` this error occurs:


```
The build logs can be found at: /var/log/synth
Scanning entire ports tree.
make: "/xports/base/gcc/Makefile" line 23: Please define CROSS_TOOLCHAIN before building

culprit: base/gcc
Scan aborted because 'make' encounted an error in the Makefile.
base/gcc (return code = 1)
Failed to scan ports tree   (Synth must exit)
```

An inspection of /base/gcc's Makefile indicates two parameters must be defined: CROSS_TOOLCHAIN and CROSS_SYSROOT. My question is what should these be set to, or is something else amiss?

A little system info.


```
uname -a
FreeBSD Dad 10.2-RELEASE-p12 FreeBSD 10.2-RELEASE-p12 #0: Tue Feb 23 18:14:09 EST 2016     chuck@Dad:/usr/obj/usr/src/sys/DEBUG_ATA  amd64
```


----------



## marino (Nov 8, 2016)

Try creating a blank file /usr/ports/base/Makefile.

This "base" category looks new and I think it's screwing Synth up.  the "gcc" port probably isn't supposed to be built at all.


----------



## marino (Nov 8, 2016)

(to explain, every category in FreeBSD ports is hooked into the build through the Makefile, but this category is missing it so all the directories are getting included.   Normally port directories that aren't in the makefile are ignored, but without the makefile all are included)


----------



## marino (Nov 8, 2016)

I updated the code to skip over the "base" category unconditionally: https://github.com/jrmarino/synth/commit/f32af2d8b84859bc605360c466c663dcff910dcd
The change would be available on the next release.


----------



## LJackson (Nov 8, 2016)

As confirmation, adding the blank /usr/ports/base/Makefile worked. After doing so, rerunning `synth upgrade-system` successfully completed.


----------



## marino (Nov 8, 2016)

Thanks for the confirmation and report.  I published version 1.65 so the nobody else gets burned by this.


----------

