Scons has been upgraded from 2.1.5 to 3.0.4 on my Gentoo system. After that, building libgl-xlib no longer worked; errors were scons: Reading SConscript files ... TypeError: a bytes-like object is required, not 'str': File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/SConstruct", line 47: ENV = os.environ, File "/usr/lib64/python3.6/site-packages/SCons/Environment.py", line 982: apply_tools(self, tools, toolpath) File "/usr/lib64/python3.6/site-packages/SCons/Environment.py", line 107: env.Tool(tool) File "/usr/lib64/python3.6/site-packages/SCons/Environment.py", line 1789: tool(self) File "/usr/lib64/python3.6/site-packages/SCons/Tool/__init__.py", line 296: self.generate(env, *args, **kw) File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/scons/gallium.py", line 219: env['gcc_compat'] = check_cc(env, 'GCC', 'defined(__GNUC__)') File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/scons/gallium.py", line 135: source.write('#if !(%s)\n#error\n#endif\n' % expr) File "/usr/lib64/python3.6/tempfile.py", line 483: return func(*args, **kwargs) Checking for GCC ... I've been told to report this upstream since apparently this is an issue with the scons files. For reference, the Gentoo bug is https://bugs.gentoo.org/684790
From the Gentoo bug it looks like your command line was simply "scons libgl-xlib". I'm testing with Scons 3.0.1 from Ubuntu 19.04. I get something different: $ scons libgl-xlib scons: Reading SConscript files ... Checking for GCC ... yes Checking for Clang ... no Checking for C header file xlocale.h... (cached) no Checking for C header file endian.h... (cached) yes Checking for C function strtod_l()... (cached) yes Checking for C function strtof_l()... (cached) yes Checking for C function timespec_get()... (cached) yes Checking for X11 (x11 xext xdamage >= 1.1 xfixes glproto >= 1.4.13 dri2proto >= 2.8)... no Checking for XCB (x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8)... no Checking for XF86VIDMODE (xxf86vm)... no Checking for DRM (libdrm >= 2.4.75)... no Checking for Python Mako module (>= 0.8.0)... yes warning: LLVM disabled: not building llvmpipe scons: done reading SConscript files. scons: Building targets ... scons: *** Do not know how to make File target `libgl-xlib' (/home/brian/projects/mesa/libgl-xlib). Stop. scons: building terminated because of errors. But, "scons -D" (build default targets) seems to proceed, but no libGL.so is produced at the end. I'll try to dig into this as time permits.
If you need any more info to help diagnose/reproduce the issue, please let me know. # python --version Python 3.6.5
OK, the problem on my end was just a few missing package dependencies for X. I also installed SCons 3.0.4 and that seemed to work too. I have python3 version 3.7.3. I wonder if that's the difference. Can you try upgrading your python?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/936.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.