Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: The module 'ℂcpp.std.type_info' is already defined in libcalypso-ldc-shared.dylib #63

Open
timotheecour opened this issue Jan 6, 2018 · 2 comments

Comments

@timotheecour
Copy link
Collaborator

timotheecour commented Jan 6, 2018

BUG:D20180106T154634

@Syniurge @klickverbot @ MartinNowak (since this seem to touch on druntime shared library initialization issues)

on OSX:

main.d:

 // simplified from https://wiki.dlang.org/Calypso
 modmap (C++) "<vector>";
 import (C++) std.vector;
 void main(){
     import core.stdc.stdio : printf;
     printf("begin\n");
     vector!int v;
     printf("v.size = %d\n", cast(int)v.size);
     printf("end\n");
 }
# build calypso (with some modifications to allow build to succeed; cf other bugs i reported)

$calypso_D/bin/ldc2 -of=$exe -cpp-args=-I$HOME/homebrew/include/ -cpp-verbosediags -v -defaultlib=phobos2-ldc-shared,druntime-ldc-shared -cpp-args=-std=c++11 -cpp-args=-stdlib=libc++ -cpp-args=-v -cpp-args=-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -cpp-args=-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include -cpp-args=-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -cpp-args=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include -cpp-args=-Wno-expansion-to-defined -L-L$calypso_D/lib -L-lcalypso-ldc-shared main.d

$exe

Fatal Error while loading 'main': The module 'ℂcpp.std.type_info' is already defined in '$calypso_D/lib/libcalypso-ldc-shared.dylib'.

environment:

binary    $calypso_D/bin/ldc2
version   1.3.0git-e5342cc-dirty (DMD v2.073.2, LLVM 3.9.1)
config    $calypso_D/bin/ldc2.conf (x86_64-apple-darwin17.2.0)
predefs   LDC all D_Version2 LDC_DCompute assert X86_64 D_InlineAsm_X86_64 D_HardFloat LittleEndian D_LP64 D_PIC OSX darwin Posix D_ObjectiveC LDC_LLVM_309
@timotheecour
Copy link
Collaborator Author

workaround: see #60 (comment)

@Syniurge
Copy link
Owner

Does this still happen for you? I can't reproduce the error anymore, but don't really know why it works now (maybe the later LDC version?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants