Bug 87654 - undefined reference to `_eglBuiltInDriverGALLIUM'
Summary: undefined reference to `_eglBuiltInDriverGALLIUM'
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2014-12-23 23:24 UTC by Vinson Lee
Modified: 2014-12-26 22:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Potential windows fix, v1. Needs testing (603 bytes, text/plain)
2014-12-24 02:02 UTC, Alexander von Gluck
Details
Fix v2 (1.07 KB, patch)
2014-12-24 04:29 UTC, Alexander von Gluck
Details | Splinter Review

Description Vinson Lee 2014-12-23 23:24:28 UTC
mesa: 402c80837258d0fd2eb5c25f2b2096ae692cda48 (master 10.5.0-devel)


$ scons platform=windows toolchain=crossmingw machine=x86_64
[...]
  Linking build/windows-x86_64-debug/egl/main/libEGL.dll ...
build/windows-x86_64-debug/egl/main/egldriver.o:egldriver.c:(.rdata+0x28): undefined reference to `_eglBuiltInDriverGALLIUM'


400b833592d9aad7b2c4627a897380642d52189f is the first bad commit
commit 400b833592d9aad7b2c4627a897380642d52189f
Author: Alexander von Gluck IV <kallisti5@unixzen.com>
Date:   Mon Dec 22 10:10:13 2014 -0500

    egl: Add Haiku code and support
    
    * This is the cleaned up work of the Haiku GCI student
      Adrián Arroyo Calle adrian.arroyocalle@gmail.com
    * Several patches were consolidated to prevent
      unnecessary touching of non-related code

:040000 040000 9671e824b72a606d39d6531ae4bc70af7fb54839 09260382434931b1e02e554dbd4f0bc195458170 M	include
:040000 040000 ca81602bbc8b7cbf231eead74f769d001ba9446c 019fd0d0af7bf6df97ed3111d886545fe40c0895 M	src
bisect run success
Comment 1 Alexander von Gluck 2014-12-23 23:39:27 UTC
I was just looking at this :-)
The EGL scons code is a bit of a mess.

I wonder if Windows is seeing this due to:

diff --git a/src/SConscript b/src/SConscript
index 2657bba..eb4cd3c 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -33,6 +33,10 @@ if not env['embedded']:
if env['platform'] not in ('cygwin', 'darwin', 'freebsd', 'haiku', 'windows'):
SConscript('glx/SConscript')
if env['platform'] not in ['darwin', 'haiku', 'sunos']:
+ SConscript('egl/drivers/dri2/SConscript')
+ SConscript('egl/main/SConscript')
+ if env['platform'] == 'haiku':
+ SConscript('egl/drivers/haiku/SConscript')
SConscript('egl/main/SConscript')


Should windows be using dri2 egl?
Comment 2 Alexander von Gluck 2014-12-24 02:01:35 UTC
I think the attached patch will fix the build issue on windows.  It looks as though the egl dri2 code shouldn't be built on Windows based on the pre-402c80837  code.


scons/gallium.py:    env['dri'] = env['x11'] and env['drm']
Comment 3 Alexander von Gluck 2014-12-24 02:02:27 UTC
Created attachment 111250 [details]
Potential windows fix, v1.  Needs testing
Comment 4 Alexander von Gluck 2014-12-24 04:29:40 UTC
Created attachment 111257 [details] [review]
Fix v2

I finally think I see what happened.  The GCI student attempted to get the final libEGL.so from src/egl/ vs src/gallium/targets/static-egl.

Once I reverted that small change (leaving the rest of the dri2 egl driver changes in tact) things seem to be working with a basic egl/demo1.c test.

Please confirm
Comment 5 Vinson Lee 2014-12-26 22:46:21 UTC
commit 890ef622d63cb1caa3f84dd04dc2442324e2b0f2
Author: Alexander von Gluck IV <kallisti5@unixzen.com>
Date:   Wed Dec 24 07:44:25 2014 -0600

    egl: Fix non-dri SCons builds re #87657
    
    * Revert change to egl main producing Shared Libraries
    * Check for dri before including dri code


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.