# Build problems, only devel/electron18 , www/iridium , www/chromium



## Alain De Vos (Dec 22, 2022)

Electron18,

```
00:35:35] [190/194] CXX src/gn/xcode_object.o
[00:35:36] [191/194] CXX src/gn/visual_studio_writer.o
[00:35:36] [192/194] CXX src/gn/xcode_writer.o
[00:35:36] [193/194] AR gn_lib.a
[00:35:36] [194/194] LINK gn
[00:35:36] cd /wrkdirs/usr/ports/devel/electron18/work/electron-18.3.11/src && /usr/bin/env PKG_CONFIG=pkgconf PYTHON="/usr/local/bin/python3.9" XDG_DATA_HOME=/wrkdirs/usr/ports/devel/electron18/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/devel/electron18/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/devel/electron18/work/.cache  HOME=/wrkdirs/usr/ports/devel/electron18/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/devel/electron18/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/devel/electron18/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh CMAKE_PREFIX_PATH="/usr/local" LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 ./out/Release/gn gen out/Release  --args='import("//electron/build/args/release.gn") clang_use_chrome_plugins=false  enable_hangout_services_extension=true  enable_js_type_check=false  enable_nacl=false  enable_one_click_signin=true  enable_remoting=false  enable_wmax_tokens=false  fatal_linker_warnings=false  is_clang=true  optimize_webui=true  toolkit_views=true  treat_warnings_as_errors=false  use_allocator="none"  use_allocator_shim=false  use_aura=true  use_custom_libcxx=false  use_gnome_keyring=false  use_lld=true  use_sysroot=false  use_system_freetype=false  use_system_harfbuzz=true  use_system_libjpeg=true  use_system_wayland_scanner=true  use_udev=false  extra_cxxflags="-O2 -pipe ""-fno-lto -O2 -pipe"" -march=ivybridge -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ""-fno-lto -O2 -pipe""  -DLIBICONV_PLUG -isystem /usr/local/include "  extra_ldflags=" -fstack-protector-strong -L/usr/local/lib " use_alsa=false use_cups=true blink_symbol_level=0 is_debug=false symbol_level=0 use_kerberos=true use_thin_lto=false use_pulseaudio=false use_sndio=true'
[00:35:36] ERROR at the command-line "--args":1:679: Expecting assignment or function call.
[00:35:36] import("//electron/build/args/release.gn") clang_use_chrome_plugins=false  enable_hangout_services_extension=true  enable_js_type_check=false  enable_nacl=false  enable_one_click_signin=true  enable_remoting=false  enable_wmax_tokens=false  fatal_linker_warnings=false  is_clang=true  optimize_webui=true  toolkit_views=true  treat_warnings_as_errors=false  use_allocator="none"  use_allocator_shim=false  use_aura=true  use_custom_libcxx=false  use_gnome_keyring=false  use_lld=true  use_sysroot=false  use_system_freetype=false  use_system_harfbuzz=true  use_system_libjpeg=true  use_system_wayland_scanner=true  use_udev=false  extra_cxxflags="-O2 -pipe ""-fno-lto -O2 -pipe"" -march=ivybridge -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ""-fno-lto -O2 -pipe""  -DLIBICONV_PLUG -isystem /usr/local/include "  extra_ldflags=" -fstack-protector-strong -L/usr/local/lib " use_alsa=false use_cups=true blink_symbol_level=0 is_debug=false symbol_level=0 use_kerberos=true use_thin_lto=false use_pulseaudio=false use_sndio=true
[00:35:36]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^-------------------------------------------------------------------------------------------------------------
[00:35:36] *** Error code 1
[00:35:36]
[00:35:36] Stop.
[00:35:36] make: stopped in /usr/ports/devel/electron18
[00:35:45] =>> Cleaning up wrkdir
[00:35:45] ===>  Cleaning for electron18-18.3.11_1
[00:42:27] build of devel/electron18 | electron18-18.3.11_1 ended at Thu Dec 22 18:19:50 CET 2022
[00:42:27] build time: 00:42:27
[00:42:27] !!! build failure encountered !!!
```

Iridium,

```
[00:34:12] [194/195] AR gn_lib.a
[00:34:13] [195/195] LINK gn
[00:34:13] cd /wrkdirs/usr/ports/www/iridium/work/iridium-browser-2022.12.108.1 && /usr/bin/env ac_cv_path_PERL=/usr/local/bin/perl ac_cv_path_PERL_PATH=/usr/local/bin/perl  PERL_USE_UNSAFE_INC=1 PKG_CONFIG=pkgconf PYTHON="/usr/local/bin/python3.9" QT_SELECT=qt5 QMAKEMODULES="/wrkdirs/usr/ports/www/iridium/work/iridium-browser-2022.12.108.1/mkspecs/modules:/usr/local/lib/qt5/mkspecs/modules" XDG_DATA_HOME=/wrkdirs/usr/ports/www/iridium/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/www/iridium/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/www/iridium/work/.cache  HOME=/wrkdirs/usr/ports/www/iridium/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/www/iridium/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/www/iridium/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh CMAKE_PREFIX_PATH="/usr/local" LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 ./out/Release/gn  gen --args='clang_use_chrome_plugins=false  chrome_pgo_phase=0  enable_hangout_services_extension=true  enable_js_type_check=false  enable_nacl=false  enable_remoting=false  fatal_linker_warnings=false  icu_use_data_file=false  is_clang=true  optimize_webui=true  toolkit_views=true  treat_warnings_as_errors=false  use_allocator="none"  use_allocator_shim=false  use_aura=true  use_custom_libcxx=false  use_gnome_keyring=false  use_lld=true  use_sysroot=false  use_system_freetype=false  use_system_harfbuzz=true  use_system_libjpeg=true  use_system_libwayland=true  use_system_wayland_scanner=true  use_system_libwayland_server=true  use_udev=false  extra_cxxflags="-O2 -pipe ""-fno-lto -O2 -pipe"" -march=ivybridge -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ""-fno-lto -O2 -pipe""  -DLIBICONV_PLUG -isystem /usr/local/include "  extra_ldflags=" -fstack-protector-strong -L/usr/local/lib " use_alsa=false ffmpeg_branding="Chrome" proprietary_codecs=true use_cups=true blink_symbol_level=0 is_debug=false is_official_build=true symbol_level=0 use_kerberos=true use_thin_lto=false use_pulseaudio=false use_sndio=true' out/Release
[00:34:13] ERROR at the command-line "--args":1:688: Expecting assignment or function call.
[00:34:13] clang_use_chrome_plugins=false  chrome_pgo_phase=0  enable_hangout_services_extension=true  enable_js_type_check=false  enable_nacl=false  enable_remoting=false  fatal_linker_warnings=false  icu_use_data_file=false  is_clang=true  optimize_webui=true  toolkit_views=true  treat_warnings_as_errors=false  use_allocator="none"  use_allocator_shim=false  use_aura=true  use_custom_libcxx=false  use_gnome_keyring=false  use_lld=true  use_sysroot=false  use_system_freetype=false  use_system_harfbuzz=true  use_system_libjpeg=true  use_system_libwayland=true  use_system_wayland_scanner=true  use_system_libwayland_server=true  use_udev=false  extra_cxxflags="-O2 -pipe ""-fno-lto -O2 -pipe"" -march=ivybridge -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ""-fno-lto -O2 -pipe""  -DLIBICONV_PLUG -isystem /usr/local/include "  extra_ldflags=" -fstack-protector-strong -L/usr/local/lib " use_alsa=false ffmpeg_branding="Chrome" proprietary_codecs=true use_cups=true blink_symbol_level=0 is_debug=false is_official_build=true symbol_level=0 use_kerberos=true use_thin_lto=false use_pulseaudio=false use_sndio=true
[00:34:13]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^-------------------------------------------------------------------------------------------------------------
[00:34:13] *** Error code 1
[00:34:13]
[00:34:13] Stop.
[00:34:13] make: stopped in /usr/ports/www/iridium
[00:34:27] =>> Cleaning up wrkdir
[00:34:33] ===>  Cleaning for iridium-browser-2022.12.108.1_1
[00:40:57] build of www/iridium | iridium-browser-2022.12.108.1_1 ended at Thu Dec 22 18:18:20 CET 2022
[00:40:57] build time: 00:40:57
[00:40:57] !!! build failure encountered !!!
```

Chromium

```
[00:37:28] [193/195] CXX src/gn/xcode_writer.o
[00:37:28] [194/195] AR gn_lib.a
[00:37:29] [195/195] LINK gn
[00:37:29] cd /wrkdirs/usr/ports/www/chromium/work/chromium-108.0.5359.124 && /usr/bin/env ac_cv_path_PERL=/usr/local/bin/perl ac_cv_path_PERL_PATH=/usr/local/bin/perl  PERL_USE_UNSAFE_INC=1 PKG_CONFIG=pkgconf PYTHON="/usr/local/bin/python3.9" QT_SELECT=qt5 QMAKEMODULES="/wrkdirs/usr/ports/www/chromium/work/chromium-108.0.5359.124/mkspecs/modules:/usr/local/lib/qt5/mkspecs/modules" XDG_DATA_HOME=/wrkdirs/usr/ports/www/chromium/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/www/chromium/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/www/chromium/work/.cache  HOME=/wrkdirs/usr/ports/www/chromium/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/www/chromium/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/www/chromium/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh CMAKE_PREFIX_PATH="/usr/local" LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 ./out/Release/gn  gen --args='clang_use_chrome_plugins=false  enable_hangout_services_extension=true  enable_js_type_check=false  enable_nacl=false  enable_remoting=false  fatal_linker_warnings=false  icu_use_data_file=false  is_clang=true  optimize_webui=true  toolkit_views=true  treat_warnings_as_errors=false  use_allocator="none"  use_allocator_shim=false  use_aura=true  use_custom_libcxx=false  use_gnome_keyring=false  use_lld=true  use_sysroot=false  use_system_freetype=false  use_system_harfbuzz=true  use_system_libjpeg=true  use_system_libwayland=true  use_system_wayland_scanner=true  use_udev=false  extra_cxxflags="-O2 -pipe ""-fno-lto -O2 -pipe"" -march=ivybridge -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ""-fno-lto -O2 -pipe""  -DLIBICONV_PLUG -isystem /usr/local/include "  extra_ldflags=" -fstack-protector-strong -L/usr/local/lib " google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" use_alsa=false ffmpeg_branding="Chrome" proprietary_codecs=true use_cups=true blink_symbol_level=0 is_debug=false is_official_build=true symbol_level=0 use_kerberos=true use_thin_lto=false use_pulseaudio=false use_sndio=true' out/Release
[00:37:29] ERROR at the command-line "--args":1:633: Expecting assignment or function call.
[00:37:29] clang_use_chrome_plugins=false  enable_hangout_services_extension=true  enable_js_type_check=false  enable_nacl=false  enable_remoting=false  fatal_linker_warnings=false  icu_use_data_file=false  is_clang=true  optimize_webui=true  toolkit_views=true  treat_warnings_as_errors=false  use_allocator="none"  use_allocator_shim=false  use_aura=true  use_custom_libcxx=false  use_gnome_keyring=false  use_lld=true  use_sysroot=false  use_system_freetype=false  use_system_harfbuzz=true  use_system_libjpeg=true  use_system_libwayland=true  use_system_wayland_scanner=true  use_udev=false  extra_cxxflags="-O2 -pipe ""-fno-lto -O2 -pipe"" -march=ivybridge -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ""-fno-lto -O2 -pipe""  -DLIBICONV_PLUG -isystem /usr/local/include "  extra_ldflags=" -fstack-protector-strong -L/usr/local/lib " google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" use_alsa=false ffmpeg_branding="Chrome" proprietary_codecs=true use_cups=true blink_symbol_level=0 is_debug=false is_official_build=true symbol_level=0 use_kerberos=true use_thin_lto=false use_pulseaudio=false use_sndio=true
[00:37:29]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^-------------------------------------------------------------------------------------------------------------
[00:37:29] *** Error code 1
[00:37:29]
[00:37:29] Stop.
[00:37:29] make: stopped in /usr/ports/www/chromium
[00:37:33] =>> Cleaning up wrkdir
[00:37:33] ===>  Cleaning for chromium-108.0.5359.124
[00:43:12] build of www/chromium | chromium-108.0.5359.124 ended at Thu Dec 22 18:20:36 CET 2022
[00:43:12] build time: 00:43:12
[00:43:12] !!! build failure encountered !!!
```

Other 3000 ports compile just fine.


----------



## cracauer@ (Dec 22, 2022)

Strange, I built Chromium successfully yesterday (well, it finished today).


----------



## cracauer@ (Dec 22, 2022)

If I read that correctly it fails in linking.

Do you have /usr/bin or /usr/local/bin first in $PATH? Whatever it is, try it the other way.


----------



## Alain De Vos (Dec 22, 2022)

My current path,
export | grep PATH

```
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
```


----------



## cracauer@ (Dec 22, 2022)

Try putting /usr/local/bin first for a test. Maybe there is something being shadowed.


----------



## Alain De Vos (Dec 23, 2022)

Currently trying make.conf,

```
MYFLAGS="-fno-lto -O2 -pipe"
CFLAGS+="${MYFLAGS}"
CXXFLAGS+="${MYFLAGS}"
LDFLAGS+="-fno-lto"
```


----------



## Alain De Vos (Dec 23, 2022)

That didn't worked. Trying make.conf,

```
MYFLAGS="-fno-lto -O2 -pipe"
#CFLAGS+="${MYFLAGS}"
#CXXFLAGS+="${MYFLAGS}"
```


----------



## richardtoohey2 (Dec 23, 2022)

The errors seem to be around the --args='a long list of things' but don't know how you are meant to address.

Looks like you reported this a couple of months ago:






						267486 – www/iridium: build error: "--args":1:653: Expecting assignment or function call
					






					bugs.freebsd.org


----------



## Alain De Vos (Dec 23, 2022)

I have 3000 ports build from source which link without any problem. Only these 3 give problem.
uname -aKU

```
FreeBSD mail.ala 13.1-RELEASE-p5 FreeBSD 13.1-RELEASE-p5 releng/13.1-n250174-753d65a19a55 MYKERNELOPT amd64 1301000 1301000
```
I looks like the linker is "confused" because of arguments...


----------



## covacat (Dec 23, 2022)

gn bombs, not ld


----------



## acheron (Dec 23, 2022)

Rebuild npm, this issue is already fixed https://cgit.freebsd.org/ports/commit/?id=cb9139ad0a3a8c3d07086ffa8926a525a3c1b1e7


----------



## Alain De Vos (Dec 23, 2022)

It looks like the problem is related to the flags in make.conf

```
MYFLAGS="-fno-lto -O2 -pipe"
CFLAGS+="${MYFLAGS}"
CXXFLAGS+="${MYFLAGS}"
```
Removing them building seems to go.


----------

