MacOS Weirdness

Ruby The Roobster rubytheroobster at yandex.com
Tue Jan 17 03:48:03 UTC 2023


I just fixed a bug in my personal D hobby project.  After pushing 
everything to github, I noticed that it fails to link with the 
latest LDC on MacOS.  The error I'm getting is thus:

```
ld: warning: alignment (1) of atom 'anon' is too small and may 
result in unaligned pointers
ld: warning: pointer not aligned at address 0x3D2C9 ('anon' + 
4809 from 
.dub/build/shared-debug-posix.osx.darwin-x86_64-ldc_v1.30.0-8F420C7727F3804A85668CA76BD80D4C//obj/libdutils.o)
ld: unaligned pointer(s) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to 
see invocation)
Error: /usr/bin/cc failed with status: 1
FAIL 
.dub/build/shared-debug-posix.osx.darwin-x86_64-ldc_v1.30.0-8F420C7727F3804A85668CA76BD80D4C/ dutils dynamicLibrary
/Users/runner/hostedtoolcache/dc/ldc2-1.30.0/x64/ldc2-1.30.0-osx-universal/bin/ldc2 failed with exit code 1.
```

This only happens when building the project as a shared library.  
It builds perfectly fine as a static library.  Any solutions?  
Thanks in advance.


More information about the Digitalmars-d-learn mailing list