[Issue 17813] New: Selective import at function-scope cause link failures
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Sep 7 07:43:54 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17813
Issue ID: 17813
Summary: Selective import at function-scope cause link failures
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dmitry.olsh at gmail.com
Reproduction
Take the following commit:
https://github.com/dlang/phobos/pull/5723/commits/7c47c11f8de3653b53de586bb255efa98ac8e93b
And move import core.exception/core.memory to functions in Grapheme struct
where they are used.
Build Phobos tests.
Interestingly debug version links fine.
The release unittest runner does not:
../druntime/src/test_runner.d:(.text._D11test_runner13getModuleInfoFAyaZPS6object10ModuleInfo[_D11test_runner13getModuleInfoFAyaZPS6object10ModuleInfo]+0x1c):
undefined reference to `_D6object10ModuleInfo7opApplyFMDFPSQBhQBdZiZi'
generated/linux/release/64/unittest/test_runner.o: In function
`_D11test_runner7testAllFZb':
../druntime/src/test_runner.d:(.text._D11test_runner7testAllFZb[_D11test_runner7testAllFZb]+0x18):
undefined reference to `_D6object10ModuleInfo7opApplyFMDFPSQBhQBdZiZi'
generated/linux/release/64/unittest/test_runner.o: In function
`_D11test_runner6doTestFPS6object10ModuleInfoKbZv':
../druntime/src/test_runner.d:(.text._D11test_runner6doTestFPS6object10ModuleInfoKbZv[_D11test_runner6doTestFPS6object10ModuleInfoKbZv]+0x3b):
undefined reference to
`_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj8currTimeFNbNdNiNeZSQCtQCr__TQCpVQCei0ZQCz'
../druntime/src/test_runner.d:(.text._D11test_runner6doTestFPS6object10ModuleInfoKbZv[_D11test_runner6doTestFPS6object10ModuleInfoKbZv]+0x48):
undefined reference to
`_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj8currTimeFNbNdNiNeZSQCtQCr__TQCpVQCei0ZQCz'
generated/linux/release/64/unittest/test_runner.o: In function
`_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj__T8opBinaryVAyaa1_2dZQtMxFNaNbNiNfSQDjQDh__TQDfVQCui0ZQDpZSQEhQEf8Duration':
../druntime/src/test_runner.d:(.text._D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj__T8opBinaryVAyaa1_2dZQtMxFNaNbNiNfSQDjQDh__TQDfVQCui0ZQDpZSQEhQEf8Duration[_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj__T8opBinaryVAyaa1_2dZQtMxFNaNbNiNfSQDjQDh__TQDfVQCui0ZQDpZSQEhQEf8Duration]+0x28):
undefined reference to
`_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj14ticksPerSecondFNaNbNdNiNfZl'
../druntime/src/test_runner.d:(.text._D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj__T8opBinaryVAyaa1_2dZQtMxFNaNbNiNfSQDjQDh__TQDfVQCui0ZQDpZSQEhQEf8Duration[_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj__T8opBinaryVAyaa1_2dZQtMxFNaNbNiNfSQDjQDh__TQDfVQCui0ZQDpZSQEhQEf8Duration]+0x45):
undefined reference to `_D4core4time8Duration6__ctorMFNaNbNcNiNflZSQBpQBnQBl'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time12TickDuration14currSystemTickFNbNdNiNeZSQBzQBxQBv'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread6Thread6__ctorMFNaNbNiNfDFZvmZCQBrQBpQBl'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk4wait8WTERMSIGFNbNiiZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk4wait11WEXITSTATUSFNbNiiZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object6Object8opEqualsMFCQtZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4stdc5errnoQgFNbNdNiNeZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj5opCmpMxFNaNbNiNfSQCrQCp__TQCnVQCci0ZQCxZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread6Thread6__ctorMFNaNbNiNfPFZvmZCQBrQBpQBl'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core9exception11AssertError6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCrQCpQCi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4stdc6stdarg7va_copyFNbJPSQBfQBdQBb13__va_list_tagQBaPvZv'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread5Fiber6__ctorMFNbPFZvmmZCQBlQBjQBf'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread6Thread7getThisFNbNiNfZCQBkQBiQBe'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4stdc5errnoQgFNbNdNiNeiZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object9Exception6__ctorMFNaNbNiNfAyaCQBm9ThrowableQrmZCQBx'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time13TimeException6__ctorMFNaNbNfAyaC6object9ThrowableQvmZCQCoQCmQCk'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time12TickDuration6__ctorMFNaNbNcNiNflZSQBuQBsQBq'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4sync9condition9Condition6__ctorMFNbNfCQBsQBq5mutex5MutexZCQCmQCkQCiQCb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk4wait9WIFEXITEDFNbNiiZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6memory2GC7reallocFNaNbPvmkxC8TypeInfoZQq'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time3absFNaNbNiNfSQyQv8DurationZQp'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time7FracSec4zeroFNaNbNdNiNfZSQBkQBiQBg'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object6Object5opCmpMFCQqZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time13TimeException6__ctorMFNaNbNfAyaQdmC6object9ThrowableZCQCoQCmQCk'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6memory2GC6addrOfFNaNbPvZQd'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time8Duration8__xopCmpFKxSQBgQBeQBcKxQmZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object5Error6__ctorMFNaNbNiNfAyaCQBi9ThrowableZCQBxQBt'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object14TypeInfo_Class4findFxAaZxCQBc'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread5Fiber5stateMxFNaNbNdNiNfZEQBnQBlQBh5State'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core8internal6string7dstrcmpFNaNbNiNeMxAaMxQeZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4stdc6stdarg6va_endFNbPSQBdQBbQz13__va_list_tagZv'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread5Fiber4callMFEQBaQyQt7RethrowZC6object9Throwable'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread6Thread7opApplyFMDFKCQBhQBfQBbZiZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread5Fiber6__ctorMFNbDFZvmmZCQBlQBjQBf'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk4stat7S_ISDIRFNbNikZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object7_xopCmpFxPvxQdZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time8Duration4zeroFNaNbNdNiNfZSQBlQBjQBh'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time7FracSec6__ctorMFNaNbNcNiNfiZSQBoQBmQBk'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4sync5mutex5Mutex6__ctorMFNbNiNeZCQBnQBlQBjQBg'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core5cpuid9datacacheG5SQyQv9CacheInfo'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6memory11pureReallocFNaNbNiPvmZQe'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time8Duration5opCmpMxFNaNbNiNfSQBlQBjQBhZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core8demangleQjFNaNbNfAxaAaZQd'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core8internal6string20unsignedToTempStringFNaNbNiNfmMNkAakZQe'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object9Exception6__ctorMFNaNbNiNfAyaQdmCQBp9ThrowableZCQBx'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4sync9condition9Condition5mutexMFNdZCQBqQBoQs5Mutex'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time__T3durVAyaa5_6e73656373ZQwFNaNbNiNflZSQBxQBv8Duration'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object10_xopEqualsFxPvxQdZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread6Thread5sleepFNbNiSQBf4time8DurationZv'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object8opEqualsFC6ObjectQiZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time__T12MonoTimeImplVEQBdQBb9ClockTypei0ZQBj5ticksMxFNaNbNdNiNfZl'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time12TickDuration9appOriginySQBkQBiQBg'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D6object8opEqualsFxC6ObjectxQjZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread5Fiber7getThisFNbNiNfZCQBjQBhQBd'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core8internal6string18signedToTempStringFNaNbNiNflMNkAakZQe'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4sync5mutex5Mutex6__ctorMFNbNiNeC6ObjectZCQBvQBtQBrQBo'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread6Thread5startMFNbZCQBfQBdQz'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6memory2GC6qallocFNaNbmkxC8TypeInfoZSQBqQBo8BlkInfo_'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core6thread11ThreadGroup6createMFDFZvZCQBoQBm6Thread'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core9exception11SwitchError6__ctorMFNaNbNfAyamC6object9ThrowableZCQCpQCnQCg'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk4wait11WIFSIGNALEDFNbNiiZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk4stat6stat_t6__initZ'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4time12TickDuration5opCmpMxFNaNbNiNfSQBqQBoQBmZi'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core9exception10RangeError6__ctorMFNaNbNfAyamC6object9ThrowableZCQCoQCmQCf'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core3sys5posixQk6select8FD_ISSETFNaNbNiiPxSQBsQBqQBpQBwQBn6fd_setZb'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core4sync9condition9Condition13mutex_nothrowMFNaNbNdNiNfZCQChQCf5mutex5Mutex'
generated/linux/release/64/unittest/libphobos2-ut.so: undefined reference to
`_D4core9exception16OutOfMemoryError6__ctorMFNaNbNiNfAyamC6object9ThrowableZCQCwQCuQCn'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
posix.mak:366: recipe for target
'generated/linux/release/64/unittest/test_runner' failed
--
More information about the Digitalmars-d-bugs
mailing list