Bug 713609
Summary: | problem compiling some drivers on ARM | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Peter Robinson <pbrobinson> | ||||||||||
Component: | mesa | Assignee: | Adam Jackson <ajax> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 14 | CC: | ajax, dsd | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2011-09-16 12:16:19 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 245418 | ||||||||||||
Attachments: |
|
Description
Peter Robinson
2011-06-15 22:50:32 UTC
Disabling SIS we get the following error on r300 g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -fPIC -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DMESA_SELINUX -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -o r300_dri.so.test ../../../../src/mesa/drivers/dri/common/dri_test.o r300_dri.so.tmp -lselinux -ldrm -lexpat -lm -lpthread -ldl -ltalloc -ldrm_radeon -lstdc++; /usr/bin/ld: r300_dri.so.test: hidden symbol `__sync_sub_and_fetch_4' in /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.5.1/libgcc.a(linux-atomic.o) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status gmake[3]: Leaving directory `/builddir/build/BUILD/mesa-20101220/src/gallium/targets/dri-r300' gmake[3]: *** [r300_dri.so] Error 1 gmake[2]: Leaving directory `/builddir/build/BUILD/mesa-20101220/src/gallium/targets' gmake[2]: *** [default] Error 1 make[1]: Leaving directory `/builddir/build/BUILD/mesa-20101220/src' make[1]: *** [subdirs] Error 1 make: *** [default] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.gGEhWE (%build) Bad exit status from /var/tmp/rpm-tmp.gGEhWE (%build) RPM build errors: Child returncode was: 1 SiS isn't an onboard-only chip, there exist PCI variants. They're all awful, of course, but that's not an excuse. The r300 error looks like it's missing a '-shared'. (In reply to comment #2) > SiS isn't an onboard-only chip, there exist PCI variants. They're all awful, > of course, but that's not an excuse. Oh, for some reason I thought they were only in cheapo Northbridges. > The r300 error looks like it's missing a '-shared'. Looks like the nouveau driver is missing the '-shared' as well. Not sure if the Makefile error has any impact on that. Is a fix just a matter of adding it to the common_flags or cflags? gmake[3]: Entering directory `/builddir/build/BUILD/mesa-20101220/src/gallium/targets/dri-nouveau' ../Makefile.dri:116: depend: No such file or directory rm -f depend touch depend /usr/bin/makedepend -fdepend -I/usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.5.1/include -DGALLIUM_RBUG -DGALLIUM_TRACE -I. -I../../../../src/mesa/drivers/dri/common -Iserver -I../../../../include -I../../../../include/GL/internal -I../../../../src/mapi -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I../../../../src/gallium/winsys -I../../../../src/mesa -I../../../../src/mesa/main -I../../../../src/mesa/math -I../../../../src/mesa/transform -I../../../../src/mesa/shader -I../../../../src/mesa/swrast -I../../../../src/mesa/swrast_setup -I../../../../src/egl/main -I../../../../src/egl/drivers/dri -I/usr/include/libdrm target.c ../../../../src/mesa/drivers/dri/common/utils.c ../../../../src/mesa/drivers/dri/common/vblank.c ../../../../src/mesa/drivers/dri/common/dri_util.c ../../../../src/mesa/drivers/dri/common/xmlconfig.c \ 2> /dev/null gmake[3]: Leaving directory `/builddir/build/BUILD/mesa-20101220/src/gallium/targets/dri-nouveau' gmake[3]: Entering directory `/builddir/build/BUILD/mesa-20101220/src/gallium/targets/dri-nouveau' mkdir -p ../../../../lib/gallium gcc -c -I. -I../../../../src/mesa/drivers/dri/common -Iserver -I../../../../include -I../../../../include/GL/internal -I../../../../src/mapi -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I../../../../src/gallium/winsys -I../../../../src/mesa -I../../../../src/mesa/main -I../../../../src/mesa/math -I../../../../src/mesa/transform -I../../../../src/mesa/shader -I../../../../src/mesa/swrast -I../../../../src/mesa/swrast_setup -I../../../../src/egl/main -I../../../../src/egl/drivers/dri -I/usr/include/libdrm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -fPIC -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DMESA_SELINUX -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DGALLIUM_RBUG -DGALLIUM_TRACE target.c -o target.o /bin/sh ../../../../bin/mklib -o nouveau_dri.so.tmp -noprefix -linker 'g++' -ldflags ' -lstdc++' \ target.o ../../../../src/mesa/drivers/dri/common/utils.o ../../../../src/mesa/drivers/dri/common/vblank.o ../../../../src/mesa/drivers/dri/common/dri_util.o ../../../../src/mesa/drivers/dri/common/xmlconfig.o ../../../../src/gallium/state_trackers/dri/drm/libdridrm.a ../../../../src/gallium/winsys/nouveau/drm/libnouveaudrm.a ../../../../src/gallium/drivers/trace/libtrace.a ../../../../src/gallium/drivers/rbug/librbug.a ../../../../src/gallium/drivers/nvfx/libnvfx.a ../../../../src/gallium/drivers/nv50/libnv50.a ../../../../src/gallium/drivers/nouveau/libnouveau.a \ -Wl,--start-group ../../../../src/mesa/libmesagallium.a ../../../../src/gallium/auxiliary/libgallium.a -Wl,--end-group \ -lselinux -ldrm -lexpat -lm -lpthread -ldl -ltalloc -ldrm_nouveau mklib: Making Linux shared library: nouveau_dri.so.tmp g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -fPIC -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DMESA_SELINUX -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -o nouveau_dri.so.test ../../../../src/mesa/drivers/dri/common/dri_test.o nouveau_dri.so.tmp -lselinux -ldrm -lexpat -lm -lpthread -ldl -ltalloc -ldrm_nouveau -lstdc++; /usr/bin/ld: nouveau_dri.so.test: hidden symbol `__sync_sub_and_fetch_4' in /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.5.1/libgcc.a(linux-atomic.o) is referenced by DSO /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status Created attachment 521272 [details] configure.ac patch The above '-shared' problems were solved by bug #733549. Removing the sis driver from the build lets it run to near completion. The attached patch could be used. Upstream has already removed this driver. However the build now fails at the very end when packaging up stuff listed under %files because it can't find BUILDROOT/mesa-7.9-5.fc14.arm/usr/lib/dri/nouveau_vieux_dri.so Need to determine why that isn't being built on ARM and what can be done about it. Created attachment 521341 [details]
configure.ac patch
Oops, there was an error in my patch where I was not building nouveau. Here's an updated patch which fixes that.
I confirm this patch works on mesa on F14 with no spec changes (other than the application of the patch).
The patch also applies cleanly to the F15 mesa version and should be applied there too.
For F16/master I see there is some new logic in the spec file to only build certain drivers on certain platforms, and it looks like the default is not to build sis, so I think in master we're all set (but we aren't yet building F16 for ARM).
If this patch looks OK I'm happy to commit it to the mesa package for F14 and F15, if that helps at all!
Created attachment 523427 [details]
F14: fix sis driver compile issue
Here is a better fix, for the f14 branch. It is a trivial backport of a commit from F16 which fixes this particular compile issue. Tested and working.
Created attachment 523429 [details] F15: fix sis driver compile issue Here is the same thing for F15. Or maybe merging the f16 branch into the f15 branch would be preferred (as seems to have happened recently). Note that even before changing anything, the current f15 version fails to build in koji. Odd. http://koji.fedoraproject.org/koji/taskinfo?taskID=3353243 Anyway, I have tested this in that the patch applies to the F15 version, even if compile fails later for unrelated reasons. Merging F16 to F15 is fine, just don't try merging all the way to F14, libdrm is too old for that to work I think. Weird that it fails to find libffi, it's certainly in the buildroot. Thanks for looking - I'm just finishing off for today but will commit this tomorrow then (f14 patch, f16 merge to f15). Done, and built successfully on ARM for F14. Thanks for your help! |