[LLVMbugs] [Bug 4429] New: ExecutionEngine JIT and Interpreter generated as . o when using cmake and makes icedtea6 linking fail.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 22 04:00:17 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4429

           Summary: ExecutionEngine JIT and Interpreter generated as .o when
                    using cmake and makes icedtea6 linking fail.
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: xerxes at zafena.se
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=3112)
 --> (http://llvm.org/bugs/attachment.cgi?id=3112)
xecutionEngine_JIT_Interpreter_o_to_a.patch cmake fix

When building icedtea6 (OpenJDK) using shark i have started to get a linking
error after llvm r73709 

icedtea6 fist creates a libjvm.so library (Linking vm...) containing the llvm
shark JIT, this links ok.

Then icedtea6 links a launcher binary against this .so library and here the
linking fail, the launcher binary dont contain any llvm calls. 

The attached patch fixes this issue by making llvm generate .a files for
LLVMExecutionEngine JIT and Interpreter.


{                                                    \
            echo Linking vm...;                                         \
                                                 \
            gcc -m32 -Xlinker -O1 -shared                                 \
                       -Xlinker --version-script=mapfile_reorder -Xlinker
-soname=libjvm.so -L/usr/local/lib  -lpthread -lffi -ldl -lm  -o libjvm.so
abstractCompiler.o accessFlags.o adaptiveSizePolicy.o adjoiningGenerations.o
adjoiningVirtualSpaces.o ageTable.o allocation.o allocationStats.o aprofiler.o
arguments.o array.o arrayKlass.o arrayKlassKlass.o arrayOop.o asPSOldGen.o
asPSYoungGen.o asParNewGeneration.o assembler.o assembler_linux_zero.o
assembler_zero.o atomic.o attachListener.o attachListener_linux.o barrierSet.o
bcEscapeAnalyzer.o biasedLocking.o binaryTreeDictionary.o bitMap.o
blockOffsetTable.o bytecode.o bytecodeHistogram.o bytecodeInterpreter.o
bytecodeInterpreterWithChecks.o bytecodeInterpreter_zero.o bytecodeStream.o
bytecodeTracer.o bytecodes.o bytecodes_zero.o cSpaceCounters.o
cardTableExtension.o cardTableModRefBS.o cardTableRS.o ciArray.o ciArrayKlass.o
ciConstant.o ciConstantPoolCache.o ciEnv.o ciExceptionHandler.o ciField.o
ciFlags.o ciInstance.o ciInstanceKlass.o ciInstanceKlassKlass.o ciKlass.o
ciKlassKlass.o ciMethod.o ciMethodBlocks.o ciMethodData.o ciMethodKlass.o
ciNullObject.o ciObjArray.o ciObjArrayKlass.o ciObjArrayKlassKlass.o ciObject.o
ciObjectFactory.o ciSignature.o ciStreams.o ciSymbol.o ciSymbolKlass.o ciType.o
ciTypeArray.o ciTypeArrayKlass.o ciTypeArrayKlassKlass.o ciTypeFlow.o
ciUtilities.o classFileError.o classFileParser.o classFileStream.o
classLoader.o classLoadingService.o classify.o cmsAdaptiveSizePolicy.o
cmsCollectorPolicy.o cmsGCAdaptivePolicyCounters.o cmsLockVerifier.o
cmsPermGen.o coTracker.o codeBlob.o codeBuffer.o codeCache.o collectedHeap.o
collectionSetChooser.o collectorCounters.o collectorPolicy.o
compactibleFreeListSpace.o compactingPermGenGen.o compilationPolicy.o
compileBroker.o compileLog.o compiledIC.o compiledICHolderKlass.o
compiledICHolderOop.o compilerOracle.o compressedStream.o concurrentG1Refine.o
concurrentG1RefineThread.o concurrentGCThread.o concurrentMark.o
concurrentMarkSweepGeneration.o concurrentMarkSweepThread.o
concurrentMarkThread.o concurrentZFThread.o constMethodKlass.o constMethodOop.o
constantPoolKlass.o constantPoolOop.o constantTag.o copy.o cpCacheKlass.o
cpCacheOop.o cppInterpreter.o cppInterpreter_zero.o debug.o debugInfo.o
debugInfoRec.o debug_zero.o defNewGeneration.o deoptimization.o
depChecker_zero.o dependencies.o dictionary.o dirtyCardQueue.o disassembler.o
disassembler_zero.o dtraceAttacher.o dtraceJSDT.o dtraceJSDT_linux.o dump.o
dump_zero.o events.o evmCompat.o exceptionHandlerTable.o exceptions.o
fieldDescriptor.o fieldType.o filemap.o forte.o fprofiler.o frame.o
frame_zero.o freeBlockDictionary.o freeChunk.o freeList.o g1BlockOffsetTable.o
g1CollectedHeap.o g1CollectorPolicy.o g1MMUTracker.o g1MarkSweep.o g1RemSet.o
g1SATBCardTableModRefBS.o g1_globals.o gSpaceCounters.o
gcAdaptivePolicyCounters.o gcCause.o gcLocker.o gcOverheadReporter.o
gcPolicyCounters.o gcStats.o gcTaskManager.o gcTaskThread.o gcUtil.o
genCollectedHeap.o genMarkSweep.o genRemSet.o generateOopMap.o generation.o
generationCounters.o generationSpec.o globalDefinitions.o globals.o
growableArray.o handles.o hashtable.o heap.o heapDumper.o heapInspection.o
heapRegion.o heapRegionRemSet.o heapRegionSeq.o histogram.o hpi.o hpi_linux.o
icBuffer.o icBuffer_zero.o icache.o icache_zero.o immutableSpace.o init.o
instanceKlass.o instanceKlassKlass.o instanceOop.o instanceRefKlass.o
intHisto.o interfaceSupport.o interp_masm_zero.o interpreter.o
interpreterRT_zero.o interpreterRuntime.o interpreter_zero.o
invocationCounter.o iterator.o java.o javaAssertions.o javaCalls.o
javaClasses.o jni.o jniCheck.o jniFastGetField.o jniFastGetField_zero.o
jniHandles.o jniPeriodicChecker.o jvm.o jvm_linux.o
jvmtiClassFileReconstituter.o jvmtiCodeBlobEvents.o jvmtiEnter.o
jvmtiEnterTrace.o jvmtiEnv.o jvmtiEnvBase.o jvmtiEnvThreadState.o
jvmtiEventController.o jvmtiExport.o jvmtiExtensions.o jvmtiGetLoadedClasses.o
jvmtiImpl.o jvmtiManageCapabilities.o jvmtiRedefineClasses.o jvmtiTagMap.o
jvmtiThreadState.o jvmtiTrace.o jvmtiUtil.o klass.o klassKlass.o klassOop.o
klassVtable.o linkResolver.o loaderConstraints.o location.o lowMemoryDetector.o
management.o markOop.o markSweep.o memRegion.o memoryManager.o memoryPool.o
memoryService.o memprofiler.o methodComparator.o methodDataKlass.o
methodDataOop.o methodKlass.o methodLiveness.o methodOop.o monitorChunk.o
mutableNUMASpace.o mutableSpace.o mutex.o mutexLocker.o mutex_linux.o
nativeInst_zero.o nativeLookup.o nmethod.o numberSeq.o objArrayKlass.o
objArrayKlassKlass.o objArrayOop.o objectMonitor_linux.o objectStartArray.o
oop.o oopFactory.o oopMap.o oopMapCache.o oopRecorder.o oopsHierarchy.o
orderAccess.o os.o osThread.o osThread_linux.o os_linux.o os_linux_zero.o
ostream.o parCardTableModRefBS.o parGCAllocBuffer.o parMarkBitMap.o
parNewGeneration.o parallelScavengeHeap.o pcDesc.o pcTasks.o perf.o perfData.o
perfMemory.o perfMemory_linux.o permGen.o placeholders.o preserveException.o
privilegedStack.o psAdaptiveSizePolicy.o psCompactionManager.o
psGCAdaptivePolicyCounters.o psGenerationCounters.o psMarkSweep.o
psMarkSweepDecorator.o psMemoryPool.o psOldGen.o psParallelCompact.o
psPermGen.o psPromotionLAB.o psPromotionManager.o psScavenge.o psTasks.o
psVirtualspace.o psYoungGen.o ptrQueue.o referencePolicy.o referenceProcessor.o
reflection.o reflectionUtils.o register.o register_definitions_zero.o
register_zero.o relocInfo.o relocInfo_zero.o relocator.o resolutionErrors.o
resourceArea.o restore.o rewriter.o rframe.o runtimeService.o safepoint.o
satbQueue.o scopeDesc.o serialize.o sharedHeap.o sharedRuntime.o
sharedRuntimeTrans.o sharedRuntimeTrig.o sharedRuntime_zero.o sharkBlock.o
sharkBuilder.o sharkCacheDecache.o sharkCompiler.o sharkConstant.o sharkEntry.o
sharkFunction.o sharkInliner.o sharkIntrinsics.o sharkMemoryManager.o
sharkRuntime.o sharkState.o sharkStateScanner.o sharkTopLevelBlock.o
sharkType.o shark_globals.o signature.o sizes.o space.o spaceCounters.o
spaceDecorator.o sparsePRT.o specialized_oop_closures.o stackMapFrame.o
stackMapTable.o stackValue.o stackValueCollection.o statSampler.o
stubCodeGenerator.o stubGenerator_zero.o stubRoutines.o stubRoutines_linux.o
stubRoutines_zero.o stubs.o survRateGroup.o sweeper.o symbolKlass.o symbolOop.o
symbolTable.o synchronizer.o systemDictionary.o task.o taskqueue.o
templateInterpreter.o templateInterpreter_zero.o templateTable.o
templateTable_zero.o tenuredGeneration.o thread.o threadCritical_linux.o
threadLS_linux_zero.o threadLocalAllocBuffer.o threadLocalStorage.o
threadService.o thread_linux_zero.o timer.o typeArrayKlass.o
typeArrayKlassKlass.o typeArrayOop.o unhandledOops.o universe.o unsafe.o utf8.o
verificationType.o verifier.o vframe.o vframeArray.o vframe_hp.o virtualspace.o
vmCMSOperations.o vmError.o vmError_linux.o vmGCOperations.o vmPSOperations.o
vmStructs.o vmSymbols.o vmThread.o vm_operations.o vm_operations_g1.o
vm_version.o vm_version_linux_zero.o vm_version_zero.o vmreg.o vmreg_zero.o
vtableStubs.o vtableStubs_zero.o vtune_linux.o workgroup.o xmlstream.o
yieldingWorkgroup.o sharkValue.o  -lstdc++ -lm -ldl -lpthread -lffi
-lLLVMX86AsmPrinter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter
-lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts
-lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore
-lLLVMSupport -lLLVMSystem;       \
                                                \
            rm -f libjvm.so.1; ln -s libjvm.so libjvm.so.1;                    
             \
            if [ -x /usr/sbin/selinuxenabled ] ; then                   \
              /usr/sbin/selinuxenabled;                                 \
              if [ $? = 0 ] ; then                                      \
                /usr/bin/chcon -t textrel_shlib_t libjvm.so;                  
\
                if [ $? != 0 ]; then                                   \
                  echo "ERROR: Cannot chcon libjvm.so";                 \
                fi                                                      \
              fi                                                        \
            fi                                                          \
        }
Linking vm...
{ \
            echo Linking launcher...; \
             \
            gcc -m32 -Xlinker -O1 -m32 -export-dynamic  -L `pwd` -o gamma
launcher.o -ljvm -lm -ldl -lpthread; \
             \
        }
Linking launcher...
/home/xerxes/icedtea6/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_shark/product/libjvm.so:
undefined reference to `llvm::sys::Mutex::Mutex(bool)'
/home/xerxes/icedtea6/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_shark/product/libjvm.so:
undefined reference to `llvm::sys::Mutex::~Mutex()'
/home/xerxes/icedtea6/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_shark/product/libjvm.so:
undefined reference to `llvm::sys::Mutex::release()'
/home/xerxes/icedtea6/openjdk-ecj/build/linux-i586/hotspot/outputdir/linux_zero_shark/product/libjvm.so:
undefined reference to `llvm::sys::Mutex::acquire()'
collect2: ld returned 1 exit status
make[7]: *** [gamma] Error 1


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list