Dear Emil,
Emil Velikov schrieb am 05.04.2014 04:10:
> On 01/04/14 01:32, Emil Velikov wrote:
>> On 29/03/14 14:24, Kai Wasserbäch wrote:
>>> Emil Velikov schrieb am 29.03.2014 14:21:
>>>> On 29/03/14 12:37, Kai Wasserbäch wrote:
>>>>> I tried a version script and and -export-symbols-regex '^xa_.*$$', which 
>>>>> really
>>>>> got added to the linking command, according to the build log, but didn't 
>>>>> have
>>>>> any impact on the actually exported symbols. I'm probably missing 
>>>>> something as
>>>>> I'm not too well versed in how to do things with Automake.
>>>>>
>>>> Strange... things were working fine last time I've checked. While I try to
>>>> reproduce what build options are you using, LLVM version ? Can I take a 
>>>> look
>>>> at the patch that you've used ?
>>>
>>> Sure. I've tried several variants of the attached
>>> "0001-Build-libxatracker-Only-export-our-own-symbols.patch", where I 
>>> replaced
>>> "LDFLAGS" with "AM_LDFLAGS" and "libxatracker_la_LDFLAGS". The last didn't 
>>> work
>>> at all and Automake warned, that no library is using the name 
>>> libxatracker_la,
>>> even though just a few lines up there was "libxatracker_la_SOURCES". I also
>>> tried listing all symbols explicitly in the version script, but that didn't
>>> change anything either.
>>>
>>> The second approach was really just patching the Makefile to add the
>>> -export-symbols-regex '^xa_.*$'
>>> to the LDFLAGS. I did it the same way, it's used with the OMX stuff, see the
>>> attached patch 
>>> "0001-Build-libxatracker-pass-export-symbols-regex-to-link.patch"
>>>
>> The key issue with your approach is that you're restricting the exported
>> symbols at the wrong "level". One should work on the finished target, as this
>> is where all the linking (inc. the one against LLVM) happens. I will prep a
>> series that clears the exported symbols in a more consistent way all across
>> all gallium targets.
>>
> 
> https://github.com/evelikov/Mesa/ branch exported-symbol-cleanup
> 
> Feel free to checkout and give it a test.

I'm currently unable to build Mesa, since I'm seeing build failures due to a
missing symbols:
> Making all in opencl
> make[4]: Entering directory 
> `/tmp/buildd/mesa-10.2~20140405.1.git4ccff1499c/build/dri/src/gallium/targets/opencl'
> /bin/bash ../../../../libtool  --tag=CXX   --mode=link g++  -g -O2 
> -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security 
> -Wall -Wall -fno-strict-aliasing -fno-builtin-memcmp  -L/usr/lib/llvm-3.5/lib 
>  -no-undefined -version-number 1:0 
> -Wl,--version-script=../../../../../../src/gallium/targets/opencl/opencl.sym 
> -Wl,--gc-sections -Wl,--no-undefined -Wl,-z,relro -o libMesaOpenCL.la -rpath 
> /usr/lib/x86_64-linux-gnu  
> ../../../../src/gallium/auxiliary/pipe-loader/libpipe_loader_client.la 
> ../../../../src/gallium/winsys/sw/null/libws_null.la 
> ../../../../src/gallium/state_trackers/clover/libclover.la 
> ../../../../src/gallium/auxiliary/libgallium.la -lxcb-dri2 -lxcb   -ldrm    
> -ldl -lclangCodeGen -lclangFrontendTool -lclangFrontend -lclangDriver 
> -lclangSerialization -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis 
> -lclangAST -lclangEdit -lclangLex -lclangBasic -lLLVMR600CodeGen 
> -lLLVMR600Desc -lLLVMR600Info -lLLVMR600AsmPrinter -lLLVMOption 
> -lLLVMIRReader -lLLVMAsm
Parser -lLLVMInstrumentation -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMMCJIT 
-lLLVMRuntimeDyld -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser 
-lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser 
-lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT 
-lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine 
-lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC 
-lLLVMObject -lLLVMBitReader -lLLVMCore -lLLVMSupport -lpthread -lffi -ledit 
-ltinfo -ldl -lm   ../../../../src/gallium/winsys/sw/dri/libswdri.la 
../../../../src/gallium/winsys/sw/xlib/libws_xlib.la -lX11 -lXext -lXfixes 
-ldrm   
> libtool: link: g++  -fPIC -DPIC -shared -nostdlib 
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o 
> /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o  -Wl,--whole-archive 
> ../../../../src/gallium/auxiliary/pipe-loader/.libs/libpipe_loader_client.a 
> ../../../../src/gallium/winsys/sw/null/.libs/libws_null.a 
> ../../../../src/gallium/state_trackers/clover/.libs/libclover.a 
> ../../../../src/gallium/auxiliary/.libs/libgallium.a 
> ../../../../src/gallium/winsys/sw/dri/.libs/libswdri.a 
> ../../../../src/gallium/winsys/sw/xlib/.libs/libws_xlib.a 
> -Wl,--no-whole-archive  -L/usr/lib/llvm-3.5/lib -lxcb-dri2 -lxcb 
> -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization 
> -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis -lclangAST 
> -lclangEdit -lclangLex -lclangBasic -lLLVMR600CodeGen -lLLVMR600Desc 
> -lLLVMR600Info -lLLVMR600AsmPrinter -lLLVMOption -lLLVMIRReader 
> -lLLVMAsmParser -lLLVMInstrumentation -lLLVMLinker -lLLVMipo -lLLVMVectorize 
> -lLLVMMCJIT -lLLVMRuntimeDyld -lLLVM
BitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen 
-lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info 
-lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMExecutionEngine 
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa 
-lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMBitReader -lLLVMCore 
-lLLVMSupport -lpthread -lffi -ledit -ltinfo -ldl -lX11 -lXext -lXfixes -ldrm 
-L/usr/lib/gcc/x86_64-linux-gnu/4.8 
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib 
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lstdc++ -lm -lc -lgcc_s 
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtendS.o 
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o  -O2 
-Wl,--version-script=../../../../../../src/gallium/targets/opencl/opencl.sym 
-Wl,--gc-sections -Wl,--no-undefined -Wl,-z -Wl,relro
   -Wl,-soname -Wl,libMesaOpenCL.so.1 -o .libs/libMesaOpenCL.so.1.0.0
> /usr/lib/llvm-3.5/lib/libclangCodeGen.a(BackendUtil.o): In function 
> `addObjCARCOptPass(llvm::PassManagerBuilder const&, 
> llvm::legacy::PassManagerBase&)':
> (.text._ZL17addObjCARCOptPassRKN4llvm18PassManagerBuilderERNS_6legacy15PassManagerBaseE+0x21):
>  undefined reference to `llvm::createObjCARCOptPass()'
> /usr/lib/llvm-3.5/lib/libclangCodeGen.a(BackendUtil.o): In function 
> `addObjCARCAPElimPass(llvm::PassManagerBuilder const&, 
> llvm::legacy::PassManagerBase&)':
> (.text._ZL20addObjCARCAPElimPassRKN4llvm18PassManagerBuilderERNS_6legacy15PassManagerBaseE+0x21):
>  undefined reference to `llvm::createObjCARCAPElimPass()'
> /usr/lib/llvm-3.5/lib/libclangCodeGen.a(BackendUtil.o): In function 
> `addObjCARCExpandPass(llvm::PassManagerBuilder const&, 
> llvm::legacy::PassManagerBase&)':
> (.text._ZL20addObjCARCExpandPassRKN4llvm18PassManagerBuilderERNS_6legacy15PassManagerBaseE+0x21):
>  undefined reference to `llvm::createObjCARCExpandPass()'
> /usr/lib/llvm-3.5/lib/libclangCodeGen.a(BackendUtil.o): In function 
> `clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions 
> const&, clang::TargetOptions const&, clang::LangOptions const&, 
> llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*)':
> (.text._ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsEN4llvm9StringRefEPNSB_6ModuleENS_13BackendActionEPNSB_11raw_ostreamE+0x61b):
>  undefined reference to `llvm::createObjCARCContractPass()'
> collect2: error: ld returned 1 exit status

I think the problem is with LLVM/Clang, since adding -lLLVMObjCARCOpts to the
OpenCL linker flags doesn't seem to help and the error message seems to
indicate, it's unresolved in libclangCodeGen.

This was a build of Git 4ccff1499c with your branch applied on top of it.

Cheers,
Kai



-- 

Kai Wasserbäch (Kai Wasserbaech)

E-Mail: k...@dev.carbon-project.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to