Open GoogleCodeExporter opened 9 years ago
Maybe it's a gdc bug. You can run make VERBOSE=on to see the commands that are
actually executed.
Maybe linking against rt is missing. Since it's a linker error I suppose it
must be some missing library.
Can you check?
Original comment by jens.k.mueller@gmail.com
on 24 Nov 2011 at 8:16
Linking D executable app_5
cd /home/gour/repos/external/cmaked2/tests/build/app_5 && /usr/bin/cmake -E
cmake_link_script CMakeFiles/app_5.dir/link.txt --verbose=on
/usr/bin/gdc -w CMakeFiles/app_5.dir/app_5 CMakeFiles/app_5.dir/cfunc.o
-oapp_5 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2 -lc
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(obje
ct_.o): In function `rt_attachDisposeEvent':
(.text+0x41c1): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(dmai
n2.o): In function `_D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv':
(.text+0x51c): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(dmai
n2.o): In function `rt_init':
(.text+0x9f3): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(dmai
n2.o): In function `rt_term':
(.text+0xa93): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(dmai
n2.o): In function `main':
(.text+0xbc2): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(life
time.o):(.text+0x1306): more undefined references to `_Unwind_Resume' follow
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function `_d_throw':
(.text+0x10e): undefined reference to `_Unwind_RaiseException'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function
`_D3gcc3deh17parse_lsda_headerFPS3gcc14unwind_generic15_Unwind_ContextPhPS3gcc3d
eh16lsda_header_infoZPh':
(.text+0x15d): undefined reference to `_Unwind_GetRegionStart'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function
`_D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwi
nd_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
(.text+0x2d3): undefined reference to `_Unwind_GetLanguageSpecificData'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function
`_D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwi
nd_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
(.text+0x336): undefined reference to `_Unwind_GetIP'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function
`_D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwi
nd_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
(.text+0x48e): undefined reference to `_Unwind_SetGR'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function
`_D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwi
nd_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
(.text+0x49e): undefined reference to `_Unwind_SetGR'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(deh.
o): In function
`_D3gcc3deh15personalityImplFiT3gcc14unwind_generic14_Unwind_ActionbPS3gcc14unwi
nd_generic17_Unwind_ExceptionPS3gcc14unwind_generic15_Unwind_ContextZk':
(.text+0x4a9): undefined reference to `_Unwind_SetIP'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(aaA.
o): In function `_aaGetRvalue':
(.text+0x18c): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(aaA.
o): In function `_aaIn':
(.text+0x296): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(aaA.
o): In function `_aaDel':
(.text+0x3b6): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(aaA.
o): In function `_aaGet':
(.text+0x7fc): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(dema
ngle.o): In function `_D4core8demangle8Demangle25mayBeTemplateInstanceNameMFZb':
(.text+0x3a6a): undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(dema
ngle.o):(.text+0x4d5c): more undefined references to `_Unwind_Resume' follow
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(unwi
nd_pe.o): In function
`_D3gcc9unwind_pe21base_of_encoded_valueFhPS3gcc14unwind_generic15_Unwind_Contex
tZm':
(.text+0xc8): undefined reference to `_Unwind_GetRegionStart'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(unwi
nd_pe.o): In function
`_D3gcc9unwind_pe21base_of_encoded_valueFhPS3gcc14unwind_generic15_Unwind_Contex
tZm':
(.text+0xd8): undefined reference to `_Unwind_GetTextRelBase'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib64/libgphobos2.a(unwi
nd_pe.o): In function
`_D3gcc9unwind_pe21base_of_encoded_valueFhPS3gcc14unwind_generic15_Unwind_Contex
tZm':
(.text+0xe8): undefined reference to `_Unwind_GetDataRelBase'
make[2]: *** [app_5/app_5] Error 1
make[2]: Leaving directory `/home/gour/repos/external/cmaked2/tests/build'
make[1]: *** [app_5/CMakeFiles/app_5.dir/all] Error 2
make[1]: Leaving directory `/home/gour/repos/external/cmaked2/tests/build'
make: *** [all] Error 2
Original comment by ggd...@gmail.com
on 24 Nov 2011 at 8:52
From above
/usr/bin/gdc -w CMakeFiles/app_5.dir/app_5 CMakeFiles/app_5.dir/cfunc.o
-oapp_5 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2 -lc
I think there is a -lrt missing.
Can you just add it and see what you get.
I'm unsure about who is responsible for adding this -lrt. Because technically
it's needed for phobos. For example dmd does it itself (see its dmd.conf).
So is gdc supposed to add it or are we?
Original comment by jens.k.mueller@gmail.com
on 24 Nov 2011 at 9:01
I found the problem:
-L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2
is wrong since it points to my system gcc and not the one on which gdc was
built.
Changing the above to:
-L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/
solved the issue. ;)
However, I'm not sure what should be changed to pick theright gdc?
Otoh, I believe, that for now I can test with dmd only and proceed with the
steps of integrating cmake2d into upstream...
Original comment by ggd...@gmail.com
on 25 Nov 2011 at 2:32
This is interesting. That means cmaked2 picked up the wrong path.
But gdc used to work. At least I added somebody's report to
http://code.google.com/p/cmaked2/wiki/TestedPlatforms some ago.
Thanks. I'll look into this.
Original comment by jens.k.mueller@gmail.com
on 25 Nov 2011 at 6:00
Original issue reported on code.google.com by
ggd...@gmail.com
on 24 Nov 2011 at 7:59