Solved port-mgmt/synth: can't bootstrap.

rigoletto@

Developer
Hello,

I am trying to bootstrap ports-mgmt/synth but it fail on lang/gcc6-aux build:

Code:
--------------------------------------------------------------------------------
--  Phase: configure
--------------------------------------------------------------------------------
===>  Configuring for gcc6-aux-20170202
/bin/mkdir -p /construction/xports/lang/gcc6-aux/work/build
cd /construction/xports/lang/gcc6-aux/work/build && /usr/bin/env CC=/construction/xports/lang/gcc6-aux/work/bootstrap/bin/gcc CXX=/construction/xports/lang/gcc6-aux/work/bootstrap/bin/g++ CFLAGS="-O2 -pipe  -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing" CPPFLAGS="-I/usr/local/include -DLIBICONV_PLUG" CXXFLAGS="-O2 -pipe -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing  -DLIBICONV_PLUG" LDFLAGS=" -L/usr/local/lib -fstack-protector" build_configargs="CPPFLAGS=\"-I/usr/local/include -DLIBICONV_PLUG\"" host_configargs="CPPFLAGS=\"-I/usr/local/include -DLIBICONV_PLUG\"" PATH=/construction/xports/lang/gcc6-aux/work/bootstrap/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin  /construction/xports/lang/gcc6-aux/work/gcc-6-20170202/configure --enable-languages=c\ c++\ ada\ fortran\ objc --build=x86_64-aux-freebsd11.0 --prefix=/usr/local/gcc6-aux --with-system-zlib --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local  --enable-shared --enable-threads=posix --enable-checking=release --disable-libmudflap --disable-libgomp --disable-libssp --with-ld=/usr/local/bin/ld --with-as=/usr/local/bin/as --enable-libquadmath --enable-nls --disable-bootstrap --disable-libcc1
checking build system type... x86_64-aux-freebsd11.0
checking host system type... x86_64-aux-freebsd11.0
checking target system type... x86_64-aux-freebsd11.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... no
checking for libvtv support... no
checking for libmpx support... no
checking for gcc... /construction/xports/lang/gcc6-aux/work/bootstrap/bin/gcc
checking for C compiler default output file name... Bad system call (core dumped)

configure: error: in `/construction/xports/lang/gcc6-aux/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
*** Error code 77

Stop.
make: stopped in /xports/lang/gcc6-aux

Any idea of what is going on?

EDIT: FreeBSD 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r308357

src.conf
Code:
WITHOUT_BHYVE=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_CALENDAR=YES
WITHOUT_DEBUG_FILES=YES
WITHOUT_EE=YES
WITHOUT_FLOPPY=YES
WITHOUT_FREEBSD_UPDATE=YES
WITHOUT_GAMES=YES
WITHOUT_HYPERV=YES
WITHOUT_INET6=YES
WITHOUT_IPFILTER=YES
WITHOUT_IPFW=YES
WITHOUT_ISCSI=YES
WITHOUT_KVM=YES
WITHOUT_LIB32=YES
WITHOUT_PC_SYSINSTALL=YES
WITHOUT_PPP=YES
WITHOUT_PROFILE=YES
WITHOUT_SENDMAIL=YES
WITHOUT_SVNLITE=YES
WITHOUT_TALK=YES
WITHOUT_TCP_WRAPPERS=YES
WITHOUT_TELNET=YES
WITHOUT_UNBOUND=YES
WITHOUT_WIRELESS=YES

Thanks!
 
Last edited by a moderator:
well, it definitely gets past configure.
This is the point where we ask what's in your <profile>-make.conf or about any non-standard configurations about your system.

edit: i guess this isn't a vanilla install based on your src.conf.
 
marino@

I just installed using pkg and then synth build ports-mgmt/synth. I was using ports-mgmt/poudriere before.

This is the /etc/make.conf:
Code:
CPUTYPE?=native
MAKE_JOBS_NUMBER?=3
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES

MK_PROFILE=no

WITHOUT_MODULES+ = sound ntfs linux

OPTIONS_SET = BASH INSULTS OPTIMIZED_CFLAGS
OPTIONS_UNSET = CUPS DEBUG DOCS EXAMPLES FONTCONFIG IPV6 NLS PROFILE X11

NO_SENDMAIL=YES

DEFAULT_VERSIONS+=ssl=libressl

Thanks you!
 
synth doesn't use /etc/make.conf. If available, it appends /usr/local/etc/synth/<profile>-make.conf to the generated one.

synth just completed building gcc6-aux fine on my stock FreeBSD 11.0-RELEASE.
This looks like damage caused by a custom freebsd build to me.
 
Ok, no make.conf in there. Do you have any idea what exactly may be causing it? I can rebuild to test any suspicion, but it just will take a while because it is a Core2Quad with 2GB of memory. :D

EDIT: I moved on and renamed the make.conf to the right place, and I will try to bootstrap it again.
 
your make.conf is wrong here:
Code:
MAKE_JOBS_NUMBER?=3

Do not override that. Synth takes care of it and you're breaking that. This is one example of why /etc/make.conf isn't used. Profile make.confs have to be carefully crafted, not just copied over.
 
for the record, I'm skeptical that adding a profile make.conf will fix anything. But let's see.
 
Last edited by a moderator:
Now you told about it I remember synth was building using just three cores (instead of four) before, may it was somehow using /etc/make.conf?
 
Last edited by a moderator:
Yes, as you predicted it didn't happened! Same result, lang/gcc6-aux failed.

EDIT:
the current LiveSystem-make.conf:
Code:
CPUTYPE=native
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES

MK_PROFILE=no

WITHOUT_MODULES+ = sound ntfs linux

OPTIONS_SET = BASH INSULTS OPTIMIZED_CFLAGS
OPTIONS_UNSET = CUPS DEBUG DOCS EXAMPLES FONTCONFIG IPV6 NLS PROFILE X11

NO_SENDMAIL=YES

DEFAULT_VERSIONS+=ssl=libressl
 
as I said before, I think it's your customized world/kernel that's to blame. A bad syscall can be a kernel/world mismatch or maybe caused by one of your changes. I don't know what more I can do since it works on stock FreeBSD 11.
 
Just to point out, sysctl.conf:
Code:
vfs.read_max=128                                # Increase VFS read-ahead

net.inet.ip.forwarding=1                        # allow packets to traverse between interfaces (default 0)
net.inet.ip.maxfragpackets=0                    # IP fragments require CPU processing time and system memory to reassemble (default 13687) - disable if NFS
net.inet.ip.maxfragsperpacket=0                 # IP fragments require CPU processing time and system memory to reassemble (default 16) - disable if NFS

net.inet.tcp.abc_l_var=44                       # increase the data send rate until the TCP HTCP calculates the networks maximum carrying capacity (default 2)
net.inet.tcp.syncookies=0                       # syncookies are just useful in case of DDoS Attack (default 1)
#net.inet.tcp.syncache.rexmtlimit=0             # uncomment in case of DDoS Attack
net.inet.tcp.syncache.rexmtlimit=0              # reduce the amount of SYN/ACKs the server will re-transmit to whom did not respond to the first SYN/ACK (default 3)
net.inet.tcp.rfc6675_pipe=1                     # increase the accuracy of TCP Fast Recovery when combined with Selective Acknowledgement (default 0)
net.inet.tcp.nolocaltimewait=1                  # Loopback interface tuning
net.inet.tcp.mssdflt=1460                       # maximum segment size (MSS) specifies the largest amount of data in a single TCP segment (default 536)

net.inet.tcp.cc.algorithm=htcp                  # The Hamilton TCP (HighSpeed-TCP) (default newreno)
net.inet.tcp.cc.htcp.rtt_scaling=1              # increase the fairness between competing TCP flows traversing different RTT paths (default 0 ; disabled)
net.inet.tcp.cc.htcp.adaptive_backoff=1         # increase bandwidth utilization by adjusting the AIMD (default 0 ; disabled)

kern.ipc.maxsockbuf=10000000                    # Unbound needs big socket buffers
kern.random.fortuna.minpoolsize=256             # increasing the 'minpoolsize' to allow higher entropy into the accumulation (default 64)

#
# HardenedBSD and DoS mitigation
#
hw.kbd.keymap_restrict_change=4                 # Disallow keymap changes for non-privileged users
kern.msgbuf_show_timestamp=1                    # display timestamp in msgbuf (default 0)
kern.randompid=6491                             # calculate PIDs by the modulus of the integer given, choose a random int (default 0)
net.inet.icmp.drop_redirect=1                   # no redirected ICMP packets (default 0)
net.inet.ip.check_interface=1                   # verify packet arrives on correct interface (default 0)
net.inet.ip.process_options=0                   # ignore IP options in the incoming packets (default 1)
net.inet.ip.random_id=1                         # assign a random IP id to each packet leaving the system (default 0)
net.inet.ip.redirect=0                          # do not send IP redirects (default 1)
net.inet.tcp.always_keepalive=0                 # disable tcp keep alive detection for dead peers, keepalive can be spoofed (default 1)
net.inet.tcp.blackhole=2                        # drop tcp packets destined for closed ports (default 0)
net.inet.tcp.drop_synfin=1                      # SYN/FIN packets get dropped on initial connection (default 0)
net.inet.tcp.fast_finwait2_recycle=1            # recycle FIN/WAIT states quickly (helps against DoS, but may cause false RST) (default 0)
net.inet.tcp.icmp_may_rst=0                     # icmp may not send RST to avoid spoofed icmp/udp floods (default 1)
net.inet.tcp.msl=5000                           # Maximum Segment Lifetime a TCP segment can exist on the network, 2*MSL (default 30000, 60 sec)
net.inet.tcp.nolocaltimewait=1                  # remove TIME_WAIT states for the loopback interface (default 0)
net.inet.tcp.path_mtu_discovery=0               # disable MTU discovery since many hosts drop ICMP type 3 packets (default 1)
net.inet.udp.blackhole=1                        # drop udp packets destined for closed sockets (default 0)
security.bsd.hardlink_check_gid=1               # unprivileged processes may not create hard links to files owned by other groups (default 0)
security.bsd.hardlink_check_uid=1               # unprivileged processes may not create hard links to files owned by other users (default 0)
security.bsd.see_other_gids=0                   # groups only see their own processes. root can see all (default 1)
security.bsd.see_other_uids=0                   # users only see their own processes. root can see all (default 1)
security.bsd.stack_guard_page=1                 # stack smashing protection (SSP), ProPolice, defence against buffer overflows (default 0)
security.bsd.unprivileged_proc_debug=0          # unprivileged processes may not use process debugging (default 1)
security.bsd.unprivileged_read_msgbuf=0         # unprivileged processes may not read the kernel message buffer (default 1)
vfs.zfs.min_auto_ashift=12                      # ZFS 4k alignment for newly created pools (default 9)
 
For the record, I was getting the same result (coredump) for lang/gcc6-aux on 11.0p7 with nooptions COMPAT_FREEBSD10; removing this line from my kernel config (and rebuilding/restarting, of course) and the build completes without issue.
 
I think COMPAT_FREEBSD10 is just needed during the migration from 10.x to 11.0.

I use a custom kernel and I was already removed that option. It really seem, in my case, something went bad at some point of the kernel/world compilation/mergemaster.

Thank you to point out!
 
no, it's needed for all programs built on 10.x (and earlier) that need to run on 11.0. Bootstrap compilers are just one example.

I don't know why somebody would disable the option. It looks like a case of being too clever. What's the upside even?
 
I am one of those who like to build all packages locally, and like to disable everything I think I will not need. When I had everything rebuilt I customized the kernel and then removed that option, what is still off - then rebuilt all the packages again.

Indeed, I had my issue solved as pointed before with that option still off.
 
Back
Top