Jump to page: 1 2
Thread overview
dmd not building with dmd
May 08, 2016
Walter Bright
May 08, 2016
Jacob Carlborg
May 08, 2016
Walter Bright
May 08, 2016
Jacob Carlborg
May 10, 2016
Jacob Carlborg
May 10, 2016
Jacob Carlborg
May 09, 2016
Lionello Lunesu
May 09, 2016
John Colvin
May 10, 2016
Lionello Lunesu
May 10, 2016
Jacob Carlborg
May 11, 2016
Lionello Lunesu
May 10, 2016
John Colvin
May 11, 2016
Lionello Lunesu
May 08, 2016
I went to create a PR, and did a git pull on all my repositories. After make clean on OSX, dmd would not build:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
no cpu specified, assuming X86
CC=c++ dmd idgen.d
Undefined symbols for architecture x86_64:
  "__Unwind_GetIPInfo", referenced from:
      ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I had to revert to dmd 2.070 as the build tool to get it to build.

My question is: is this expected behavior, or should I file a bug?

-Steve
May 08, 2016
On 5/7/2016 11:43 PM, Steven Schveighoffer wrote:
> I went to create a PR, and did a git pull on all my repositories. After make
> clean on OSX, dmd would not build:
>
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
> no cpu specified, assuming X86
> CC=c++ dmd idgen.d
> Undefined symbols for architecture x86_64:
>   "__Unwind_GetIPInfo", referenced from:
>       ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
> I had to revert to dmd 2.070 as the build tool to get it to build.
>
> My question is: is this expected behavior, or should I file a bug?
>
> -Steve

__dmd_personality_v0 is in druntime\src\rt\dwarfeh.d, and was added rather recently. So it seems you have a dmd-phobos mismatch.
May 08, 2016
On 5/8/16 9:18 AM, Walter Bright wrote:
> On 5/7/2016 11:43 PM, Steven Schveighoffer wrote:
>> I went to create a PR, and did a git pull on all my repositories.
>> After make
>> clean on OSX, dmd would not build:
>>
>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f
>> posix.mak
>> no cpu specified, assuming X86
>> CC=c++ dmd idgen.d
>> Undefined symbols for architecture x86_64:
>>   "__Unwind_GetIPInfo", referenced from:
>>       ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>>
>> I had to revert to dmd 2.070 as the build tool to get it to build.
>>
>> My question is: is this expected behavior, or should I file a bug?
>>
>> -Steve
>
> __dmd_personality_v0 is in druntime\src\rt\dwarfeh.d, and was added
> rather recently. So it seems you have a dmd-phobos mismatch.

I don't know what I'm doing wrong:

Stevens-MacBook-Pro:dmd steves$ dmd --version
DMD64 D Compiler v2.071.0
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
Stevens-MacBook-Pro:dmd steves$ type dmd
dmd is hashed (/Users/steves/.dvm/compilers/dmd-2.071.0/osx/bin/dmd)

I'm using dvm to install dmd, so I'm very sure it should work, I don't know if I have strange files somewhere?

If I build idgen manually and continue building, it fails again, this time with c++ compiler:

Stevens-MacBook-Pro:dmd steves$ cd src
Stevens-MacBook-Pro:src steves$ dmd idgen.d
Stevens-MacBook-Pro:src steves$ cd ..
Stevens-MacBook-Pro:dmd steves$ make -f posix.mak
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
no cpu specified, assuming X86
  (CC)  ROOT_OBJS  root/newdelete.c
c++ -c -Wno-deprecated -Wstrict-aliasing -Wno-logical-op-parentheses -Wno-dynamic-class-memaccess -Wno-switch -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_OSX=1 -DDM_TARGET_CPU_X86=1 -m64 -Iroot -MMD -MF newdelete.deps root/newdelete.c
  (CC)  GLUE_OBJS  glue.c
c++ -c -Wno-deprecated -Wstrict-aliasing -Wno-logical-op-parentheses -Wno-dynamic-class-memaccess -Wno-switch -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_OSX=1 -DDM_TARGET_CPU_X86=1 -m64 -Iroot -Itk -Ibackend -MMD -MF glue.deps glue.c
glue.c:26:10: fatal error: 'id.h' file not found
#include "id.h"
         ^
1 error generated.
make[1]: *** [glue.o] Error 1
make: *** [all] Error 2

Does this give any more clues?

-Steve
May 08, 2016
On Sunday, 8 May 2016 at 06:43:38 UTC, Steven Schveighoffer wrote:

> Undefined symbols for architecture x86_64:
>   "__Unwind_GetIPInfo", referenced from:
>       ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
> ld: symbol(s) not found for architecture x86_64

It's a bug that has been reported and fixed [1]. Unwind_GetIPInfo is not available on OS X or rather in libc++abi which is used by default on OS X.

[1] https://issues.dlang.org/show_bug.cgi?id=15911
--
/Jacob Carlborg
May 08, 2016
On Sunday, 8 May 2016 at 10:30:06 UTC, Jacob Carlborg wrote:
> On Sunday, 8 May 2016 at 06:43:38 UTC, Steven Schveighoffer wrote:
>
>> Undefined symbols for architecture x86_64:
>>   "__Unwind_GetIPInfo", referenced from:
>>       ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
>> ld: symbol(s) not found for architecture x86_64
>
> It's a bug that has been reported and fixed [1]. Unwind_GetIPInfo is not available on OS X or rather in libc++abi which is used by default on OS X.
>
> [1] https://issues.dlang.org/show_bug.cgi?id=15911
> --
> /Jacob Carlborg

Ok thanks. Will wait for next release. For some reason this doesn't affect command line compiles

-Steve
May 08, 2016
On Sunday, 8 May 2016 at 07:18:05 UTC, Walter Bright wrote:

> __dmd_personality_v0 is in druntime\src\rt\dwarfeh.d, and was added rather recently. So it seems you have a dmd-phobos mismatch.

I'm not sure what how your current setup looks like. But on OS X these days we should target clang, libc++ and libc++abi. Unwind_GetIPInfo does not exist in libc++abi.

--
/Jacob Carlborg
May 08, 2016
On 5/8/2016 12:18 AM, Walter Bright wrote:
> On 5/7/2016 11:43 PM, Steven Schveighoffer wrote:
>> I went to create a PR, and did a git pull on all my repositories. After make
>> clean on OSX, dmd would not build:
>>
>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
>> no cpu specified, assuming X86
>> CC=c++ dmd idgen.d
>> Undefined symbols for architecture x86_64:
>>   "__Unwind_GetIPInfo", referenced from:
>>       ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>
>> I had to revert to dmd 2.070 as the build tool to get it to build.
>>
>> My question is: is this expected behavior, or should I file a bug?
>>
>> -Steve
>
> __dmd_personality_v0 is in druntime\src\rt\dwarfeh.d, and was added rather
> recently. So it seems you have a dmd-phobos mismatch.

I should read more carefully, it is __Unwind_GetIPInfo that is undefined, not __dmd_personality_v0.

Anyhow, thanks to Jacob for correctly diagnosing it.
May 09, 2016
On 8/5/2016 14:43, Steven Schveighoffer wrote:
> I went to create a PR, and did a git pull on all my repositories. After
> make clean on OSX, dmd would not build:
>
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
> no cpu specified, assuming X86
> CC=c++ dmd idgen.d
> Undefined symbols for architecture x86_64:
>    "__Unwind_GetIPInfo", referenced from:
>        ___dmd_personality_v0 in libphobos2.a(dwarfeh_5c8_811.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> I had to revert to dmd 2.070 as the build tool to get it to build.
>
> My question is: is this expected behavior, or should I file a bug?
>
> -Steve

I ran into this as well. It's a bug in the package from brew: it shipped with the wrong phobos. You can build your own DMD:

$ make -f posix.mak AUTO_BOOTSTRAP=1
May 09, 2016
On Monday, 9 May 2016 at 07:57:33 UTC, Lionello Lunesu wrote:
> On 8/5/2016 14:43, Steven Schveighoffer wrote:
>> [...]
>
> I ran into this as well. It's a bug in the package from brew: it shipped with the wrong phobos. You can build your own DMD:
>
> $ make -f posix.mak AUTO_BOOTSTRAP=1

In what way do you mean "shipped with the wrong phobos"?
May 10, 2016
On 9/5/2016 20:19, John Colvin wrote:
> On Monday, 9 May 2016 at 07:57:33 UTC, Lionello Lunesu wrote:
>> On 8/5/2016 14:43, Steven Schveighoffer wrote:
>>> [...]
>>
>> I ran into this as well. It's a bug in the package from brew: it
>> shipped with the wrong phobos. You can build your own DMD:
>>
>> $ make -f posix.mak AUTO_BOOTSTRAP=1
>
> In what way do you mean "shipped with the wrong phobos"?

Well, it's either wrong phobos or wrong dmd. I assumed phobos was mismatched, but perhaps DMD was mismatched? Installing with brew suggest it's installing 2.071.0, but DMD appears to be 2.070:

$ brew install dmd
==> Downloading https://homebrew.bintray.com/bottles/dmd-2.071.0.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/dmd-2.071.0.el_capitan.bottle.tar.gz
==> Pouring dmd-2.071.0.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/dmd/2.071.0: 561 files, 65.0M

$ /usr/local/bin/dmd --version
DMD64 D Compiler v2.070
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright

« First   ‹ Prev
1 2