Bug 108032 - nv50_ir_lowering_gm107.cpp:326: undefined reference to `nv50_ir::NVC0LoweringPass::loadMsAdjInfo32(nv50_ir::TexInstruction::Target, unsigned int, int, nv50_ir::Value*, bool)'
Summary: nv50_ir_lowering_gm107.cpp:326: undefined reference to `nv50_ir::NVC0Lowering...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Nouveau Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-23 15:04 UTC by Fabio Pedretti
Modified: 2018-09-23 17:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Fabio Pedretti 2018-09-23 15:04:11 UTC
Since latest commits mesa fails to build with:
./.libs/libnouveau.a(nv50_ir_lowering_gm107.o): In function `nv50_ir::GM107LoweringPass::handleSUQ(nv50_ir::TexInstruction*)':
/<<PKGBUILDDIR>>/build/src/gallium/drivers/nouveau/../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp:326: undefined reference to `nv50_ir::NVC0LoweringPass::loadMsAdjInfo32(nv50_ir::TexInstruction::Target, unsigned int, int, nv50_ir::Value*, bool)'
/<<PKGBUILDDIR>>/build/src/gallium/drivers/nouveau/../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp:322: undefined reference to `nv50_ir::NVC0LoweringPass::loadMsAdjInfo32(nv50_ir::TexInstruction::Target, unsigned int, int, nv50_ir::Value*, bool)'
collect2: error: ld returned 1 exit status
Makefile:1178: recipe for target 'nouveau_compiler' failed

Full build log with configure options here:
https://launchpadlibrarian.net/389864818/buildlog_ubuntu-xenial-i386.mesa_18.3~git1809230730.b473fc~oibaf~x_BUILDING.txt.gz
Comment 1 Rhys Perry 2018-09-23 15:22:35 UTC
This builds fine for me, so I guess it's some compiler quirk.

Does removing the "inline" on line 1735 in nv50_ir_lowering_nvc0.cpp (at the implementation of loadMsAdjInfo32()) fix the problem?
Comment 2 Rhys Perry 2018-09-23 17:03:38 UTC
Seems that although I can't reproduce it with 64-bit targeted Meson, I can with with 32-bit targeted autotools.

Removing the inline does fix the error and I've posted a patch doing that:
https://lists.freedesktop.org/archives/mesa-dev/2018-September/205821.html

It or something similar should be pushed soon.
Comment 3 Rhys Perry 2018-09-23 17:22:41 UTC
Fixed by:

commit 6ca1402c117856b55d044be1e82224db30ed1b02
Author: Rhys Perry <pendingchaos02@gmail.com>
Date:   Sun Sep 23 17:57:08 2018 +0100

    nv50/ir: fix link-time build failure
    
    Seems this fixes linking problems that occur in some situations.
    
    Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
    Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>


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.