nordlow / gmp-d

D-language high-level wrapper for GNU MP (GMP) library
14 stars 6 forks source link

Compiling unittests on OSX #4

Closed grogancolin closed 6 years ago

grogancolin commented 7 years ago

When compiling on OSX, the unittests are importing libs that don't exist:

dub build --build=unittest
Fetching gmp-d 0.0.3 (getting selected version)...
Performing "unittest" build using dmd for x86_64.
libgmp 1.0.0: target for configuration "library" is up to date.
gmp-d 0.0.3: building configuration "library"...
numfmtted ~master: building configuration "application"...
../../.dub/packages/gmp-d-0.0.3/gmp-d/src/gmp/q.d(646,12): Error: module dbgio is in file 'dbgio.d' which cannot be read

When removing that specific unittest - there's other errors:

dub build --build=unittest
Performing "unittest" build using dmd for x86_64.
libgmp 1.0.0: target for configuration "library" is up to date.
gmp-d 0.0.3: building configuration "library"...
numfmtted ~master: building configuration "application"...
Linking...
Undefined symbols for architecture x86_64:
  "free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in libgmp-d.a(z_16_117.o)
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in libgmp-d.a(z_16_117.o)
     (maybe you meant: _D2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap8freeNodeFNbNiPS2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap4NodeZv, _D2gc4impl12conservative2gc15LargeObjectPool9freePagesMFNbmmZv , _D2gc4impl12conservative2gc14ConservativeGC163__T9runLockedS63_D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZvS37_D2gc4impl12conservative2gc8freeTimelS37_D2gc4impl12conservative2gc8numFreeslTPvZ9runLockedMFNbKPvZv , _D2gc4impl12conservative2gc14ConservativeGC4freeMFNbPvZv , _D2rt5minfo11ModuleGroup4freeMFZv , _D2rt7dwarfeh15ExceptionHeader4freeFPS2rt7dwarfeh15ExceptionHeaderZv , _D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZv , _D2gc4impl12conservative2gc3Gcx8log_freeMFNbPvZv , _D2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap8freeNodeFNbNiPS2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap4NodeZv , _D2gc4impl6manual2gc8ManualGC4freeMFNbPvZv , _D4core6memory2GC4freeFNaNbPvZv , _gc_free , _D2gc4impl12conservative2gc8freeTimel , _D2gc4impl12conservative2gc4Pool12freePageBitsMFNbmKxG4mZv )
  "malloc", referenced from:
      _D3gmp1z3MpZ19_allocStringzCopyOfMFNaNbNiNexAyaZPa in libgmp-d.a(z_16_117.o)
     (maybe you meant: _D2gc4impl12conservative2gc14ConservativeGC207__T9runLockedS83_D2gc4impl12conservative2gc14ConservativeGC13reallocNoSyncMFNbPvmKkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTPvTmTkTmTxC8TypeInfoZ9runLockedMFNbKPvKmKkKmKxC8TypeInfoZPv, _D2gc4impl12conservative2gc14ConservativeGC200__T9runLockedS79_D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTmTkTmTxC8TypeInfoZ9runLockedMFNbKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc10mallocTimel , _gc_malloc , _D4core6memory2GC6mallocFNaNbmkxC8TypeInfoZPv , _D2rt4util9container6common7xmallocFNbNimZPv , _D2gc4impl12conservative2gc3Gcx10log_mallocMFNbPvmZv , _D2gc4impl6manual2gc8ManualGC6mallocMFNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPv )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
dmd failed with exit code 1.

Has this lib been tested on OSX at all?

When compiling in not-unittest mode, it all just works.

nordlow commented 7 years ago

I've pushed a fix on master. Can you use that for now?

The import of dbgio:dln is just for convenient debug printing in qualified code but isn't used in releases.

grogancolin commented 7 years ago

Thanks for looking into this!

Compiling on the master branch now. I now get the following:

dub build --build=unittest
Performing "unittest" build using dmd for x86_64.
libgmp 1.0.0: target for configuration "library" is up to date.
gmp-d 0.0.3+commit.3.g6dc00b7: building configuration "library"...
numfmtted ~master: building configuration "application"...
Linking...
Undefined symbols for architecture x86_64:
  "free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in libgmp-d.a(z_16_117.o)
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in libgmp-d.a(z_16_117.o)
     (maybe you meant: _D2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap8freeNodeFNbNiPS2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap4NodeZv, _D2gc4impl12conservative2gc15LargeObjectPool9freePagesMFNbmmZv , _D2gc4impl12conservative2gc14ConservativeGC163__T9runLockedS63_D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZvS37_D2gc4impl12conservative2gc8freeTimelS37_D2gc4impl12conservative2gc8numFreeslTPvZ9runLockedMFNbKPvZv , _D2gc4impl12conservative2gc14ConservativeGC4freeMFNbPvZv , _D2rt5minfo11ModuleGroup4freeMFZv , _D2rt7dwarfeh15ExceptionHeader4freeFPS2rt7dwarfeh15ExceptionHeaderZv , _D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZv , _D2gc4impl12conservative2gc3Gcx8log_freeMFNbPvZv , _D2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap8freeNodeFNbNiPS2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap4NodeZv , _D2gc4impl6manual2gc8ManualGC4freeMFNbPvZv , _D4core6memory2GC4freeFNaNbPvZv , _gc_free , _D2gc4impl12conservative2gc8freeTimel , _D2gc4impl12conservative2gc4Pool12freePageBitsMFNbmKxG4mZv )
  "malloc", referenced from:
      _D3gmp1z3MpZ19_allocStringzCopyOfMFNaNbNiNexAyaZPa in libgmp-d.a(z_16_117.o)
     (maybe you meant: _D2gc4impl12conservative2gc14ConservativeGC207__T9runLockedS83_D2gc4impl12conservative2gc14ConservativeGC13reallocNoSyncMFNbPvmKkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTPvTmTkTmTxC8TypeInfoZ9runLockedMFNbKPvKmKkKmKxC8TypeInfoZPv, _D2gc4impl12conservative2gc14ConservativeGC200__T9runLockedS79_D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTmTkTmTxC8TypeInfoZ9runLockedMFNbKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc10mallocTimel , _gc_malloc , _D4core6memory2GC6mallocFNaNbmkxC8TypeInfoZPv , _D2rt4util9container6common7xmallocFNbNimZPv , _D2gc4impl12conservative2gc3Gcx10log_mallocMFNbPvmZv , _D2gc4impl6manual2gc8ManualGC6mallocMFNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPv )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
dmd failed with exit code 1.

Looking at it, it's likely a similar issue, where you want a convenience function in test code?

grogancolin commented 7 years ago

Or maybe actually, it's a different version of gmp on my system. I'm running gmp 6.1.1

nordlow commented 7 years ago

Strange, looks the linker cannot find the standard C functions malloc and free.

Can you try adding

pragma(lib, "c");

at the bottom of z.d?

I pushed a fix on master for this.

Maybe clang, opposite to gcc, doesn't automatically include libc in the linking...

bvoq commented 7 years ago

Hello nordlow, I'm able to compile your script on macOS (10.12.5 beta) using dub build --build=unittest and GMP 6.1.2.

However I get the same error when importing your gmp library into my project. I used your newest commit (with the fix) and it still returns:

Undefined symbols for architecture x86_64:
  "free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in psi4.o
     (maybe you meant: _D2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap8freeNodeFNbNiPS2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap4NodeZv, _D2gc4impl12conservative2gc15LargeObjectPool9freePagesMFNbmmZv , _D2gc4impl12conservative2gc8freeTimel , _D2gc4impl12conservative2gc4Pool12freePageBitsMFNbmKxG4mZv , _D2gc4impl12conservative2gc14ConservativeGC163__T9runLockedS63_D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZvS37_D2gc4impl12conservative2gc8freeTimelS37_D2gc4impl12conservative2gc8numFreeslTPvZ9runLockedMFNbKPvZv , _D2gc4impl12conservative2gc14ConservativeGC4freeMFNbPvZv , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZ18__T9__lambda2TAyaZ9__lambda2MFAyaZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei39Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression8FieldExp12freeVarsImplMFMDFAyaZiZi , _D10expression11CompoundExp8__mixin612freeVarsImplMFMDFAyaZiZi , _D2gc4impl12conservative2gc3Gcx8log_freeMFNbPvZv , _D4type7ErrorTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression11CObserveExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type7ArrayTy12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars7opApplyMFMDFC5dexpr4DVarZiZi , _D4type9ContextTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D11declaration12CompoundDecl8__mixin612freeVarsImplMFMDFAyaZiZi , _D5dexpr5DExpr8freeVarsMFNaNbNiNfZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D2rt7dwarfeh15ExceptionHeader4freeFPS2rt7dwarfeh15ExceptionHeaderZv , _D11declaration11Declaration8__mixin812freeVarsImplMFMDFAyaZiZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr10DDiscDelta8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DPow8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D5dexpr10DDistApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8SliceExp12freeVarsImplMFMDFAyaZiZi , _D43TypeInfo_S5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D2gc4impl6manual2gc8ManualGC4freeMFNbPvZv , _D5dexpr3DΠ8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei95Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D10expression6IteExp12freeVarsImplMFMDFAyaZiZi , _D4type11AggregateTy8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression10ABinaryExp12freeVarsImplMFMDFAyaZiZi , _D4type6TypeTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D11declaration12SingleDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D4type7TupleTy12freeVarsImplMFMDFAyaZiZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei49Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloor8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars14__aggrPostblitMFNaNbNiNfZv , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei66Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei53Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei47Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DIvr8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9AssertExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression9ReturnExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression8ArrayExp12freeVarsImplMFMDFAyaZiZi , _D10expression9LambdaExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression8TupleExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DArray8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9RepeatExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D10expression14PlaceholderExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression10Identifier12freeVarsImplMFMDFAyaZiZi , _D5dexpr10DNormalize8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10Expression8freeVarsMFZS10expression10Expression8FreeVars , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKAyaKC5dexpr5DExprZi , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression7CallExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DErr8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZv , _D11declaration11MultiDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D4type5ℝTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr2DE8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type8StringTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars9__xtoHashFNbNeKxS5dexpr5DExpr8freeVarsMFZ8FreeVarsZm , _D10expression8WhileExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D4core6memory2GC4freeFNaNbPvZv , _D5dexpr6DField8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DCat8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr8DIUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DTuple8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DAbs8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10ObserveExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DVal8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSin8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DInf8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZi , _D10expression8IndexExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloat8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr9DGaussInt8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DCeil8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr12DDeBruijnVar8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DNVar8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8ErrorExp8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr6DDelta8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _gc_free , _D10expression17TypeAnnotationExp12freeVarsImplMFMDFAyaZiZi , _D2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap8freeNodeFNbNiPS2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap4NodeZv , _D5dexpr6DIndex8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLog8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D2rt5minfo11ModuleGroup4freeMFZv , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4Dℚ8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10LiteralExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D5dexpr5DBind8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars8opAssignMFNaNbNcNiNjNeS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr6DSlice9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List8freeNodeMFPS3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List4NodeZv , _D10expression6ForExp9__mixin1312freeVarsImplMFMDFAyaZiZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr8DRUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi )
  "malloc", referenced from:
      _D3gmp1z3MpZ19_allocStringzCopyOfMFNaNbNiNexAyaZPa in psi4.o
     (maybe you meant: _D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPv, _D2gc4impl12conservative2gc14ConservativeGC200__T9runLockedS79_D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTmTkTmTxC8TypeInfoZ9runLockedMFNbKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC207__T9runLockedS83_D2gc4impl12conservative2gc14ConservativeGC13reallocNoSyncMFNbPvmKkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTPvTmTkTmTxC8TypeInfoZ9runLockedMFNbKPvKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc3Gcx10log_mallocMFNbPvmZv , _gc_malloc , _D4core6memory2GC6mallocFNaNbmkxC8TypeInfoZPv , _D2gc4impl6manual2gc8ManualGC6mallocMFNbmkxC8TypeInfoZPv , _D4util24__T14mallocAppenderTAyaZ14mallocAppenderFNbNimZS4util25__T14MallocAppenderHTAyaZ14MallocAppender , _D2gc4impl12conservative2gc10mallocTimel , _D2rt4util9container6common7xmallocFNbNimZPv )
ld: symbol(s) not found for architecture x86_64

I also get the error when running dub test

nordlow commented 7 years ago

The functions malloc and free are defined in libc. I've added libc as a libs-dependency to gmp-d in dub.sdl on master.

If that doesn't work try adding the line

libs "gmp" "c"

to your dub.sdl or corresponding JSON-formatted

"libs": [
    "c"
],

if you are using dub.json.

bvoq commented 7 years ago

Hmm.. I still get the same error when running dub test and when trying to run another project importing your project. I tried adding "libs": ["c"], with no success and your project already has libs "gmp" "c" in the dub.sdl When I recursively add all files of the project (including all files in the gmp folder) to dmd I get the following error:

dmd -c -of.dub/build/application-debug-posix.osx-x86_64-dmd_2074-508476B0A89D7D55F6705B7396812947/psi4.o -debug -g -unittest -version=Have_psi4 -Isource/ source/app.d source/approximate.d source/asymptotics.d source/backend.d source/bruteforce.d source/declaration.d source/dexpr.d source/differentiation.d source/distrib.d source/dparse.d source/error.d source/expression.d source/findcriticalvalues.d source/gmp/dbgio.d source/gmp/f.d source/gmp/package.d source/gmp/q.d source/gmp/traits.d source/gmp/z.d source/hashtable.d source/help.d source/integration.d source/intervalarithmetic.d source/intervalarithmeticdefinitionranges.d source/lexer.d source/limits.d source/numericevaluation.d source/numericintegration.d source/options.d source/parser.d source/psi.d source/renormalization.d source/scope_.d source/semantic_.d source/solve.d source/summarize.d source/summation.d source/symbolic.d source/terminal.d source/type.d source/util.d -vcolumns
dmd -of.dub/build/application-debug-posix.osx-x86_64-dmd_2074-508476B0A89D7D55F6705B7396812947/psi4 .dub/build/application-debug-posix.osx-x86_64-dmd_2074-508476B0A89D7D55F6705B7396812947/psi4.o -L-lc -g
Linking...
Undefined symbols for architecture x86_64:
  "___gmpq_abs", referenced from:
      _D3gmp1q8__T3absZ3absFNaNbNiNeKxS3gmp1q3MpQZS3gmp1q3MpQ in psi4.o
  "___gmpq_add", referenced from:
      _D3gmp1q3MpQ22__T8opBinaryVAyaa1_2bZ8opBinaryMxFNaNbNiNexS3gmp1q3MpQZS3gmp1q3MpQ in psi4.o
  "___gmpq_canonicalize", referenced from:
      _D3gmp1q3MpQ12canonicalizeMFNaNbNiNeZv in psi4.o
  "___gmpq_clear", referenced from:
      _D3gmp1q3MpQ6__dtorMFNaNbNiNeZv in psi4.o
  "___gmpq_cmp", referenced from:
      _D3gmp1q3MpQ10__T5opCmpZ5opCmpMxFNaNbNiNeKxS3gmp1q3MpQZi in psi4.o
      _D3gmp1q3MpQ10__T5opCmpZ5opCmpMxFNaNbNiNexS3gmp1q3MpQZi in psi4.o
  "___gmpq_cmp_si", referenced from:
      _D3gmp1q3MpQ12__T5opCmpTiZ5opCmpMxFNaNbNiNeiZi in psi4.o
  "___gmpq_cmp_ui", referenced from:
      _D3gmp1q3MpQ12__T5opCmpTmZ5opCmpMxFNaNbNiNemZi in psi4.o
  "___gmpq_cmp_z", referenced from:
      _D3gmp1q3MpQ10__T5opCmpZ5opCmpMxFNaNbNiNexS3gmp1z3MpZZi in psi4.o
  "___gmpq_div", referenced from:
      _D3gmp1q3MpQ22__T8opBinaryVAyaa1_2fZ8opBinaryMxFNaNbNiNexS3gmp1q3MpQZS3gmp1q3MpQ in psi4.o
  "___gmpq_equal", referenced from:
      _D3gmp1q3MpQ13__T8opEqualsZ8opEqualsMxFNaNbNiNexS3gmp1q3MpQZb in psi4.o
      _D3gmp1q3MpQ13__T8opEqualsZ8opEqualsMxFNaNbNiNeKxS3gmp1q3MpQZb in psi4.o
  "___gmpq_get_d", referenced from:
      _D3gmp1q3MpQ13__T6opCastTdZ6opCastMxFNaNbNiNeZd in psi4.o
  "___gmpq_init", referenced from:
      _D3gmp1q3MpQ10initializeMFNaNbNiNeZv in psi4.o
  "___gmpq_inv", referenced from:
      _D3gmp1q12__T7inverseZ7inverseFNaNbNiNeKxS3gmp1q3MpQZS3gmp1q3MpQ in psi4.o
  "___gmpq_mul", referenced from:
      _D3gmp1q3MpQ22__T8opBinaryVAyaa1_2aZ8opBinaryMxFNaNbNiNexS3gmp1q3MpQZS3gmp1q3MpQ in psi4.o
  "___gmpq_set_d", referenced from:
      _D3gmp1q3MpQ15__T8opAssignTdZ8opAssignMFNaNbNcNiNjNedZS3gmp1q3MpQ in psi4.o
      _D3gmp1q3MpQ15__T8opAssignTfZ8opAssignMFNaNbNcNiNjNefZS3gmp1q3MpQ in psi4.o
  "___gmpq_set_si", referenced from:
      _D3gmp1q3MpQ15__T6__ctorTiTmZ6__ctorMFNaNbNcNiNeimbZS3gmp1q3MpQ in psi4.o
      _D3gmp1q3MpQ15__T8opAssignTiZ8opAssignMFNaNbNcNiNjNeiZS3gmp1q3MpQ in psi4.o
      _D3gmp1q3MpQ15__T6__ctorTiTiZ6__ctorMFNaNbNcNiNeiibZS3gmp1q3MpQ in psi4.o
  "___gmpq_set_ui", referenced from:
      _D3gmp1q3MpQ15__T6__ctorTmTmZ6__ctorMFNaNbNcNiNemmbZS3gmp1q3MpQ in psi4.o
  "___gmpq_sub", referenced from:
      _D3gmp1q3MpQ22__T8opBinaryVAyaa1_2dZ8opBinaryMxFNaNbNiNexS3gmp1q3MpQZS3gmp1q3MpQ in psi4.o
  "___gmpz_abs", referenced from:
      _D3gmp1z3MpZ8absoluteMFNaNbNiNeZv in psi4.o
      _D3gmp1z8__T3absZ3absFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_add", referenced from:
      _D3gmp1z40__T10MpzAddExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzAddExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2bZ8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2bZ8opBinaryMxFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_2bZ10opOpAssignMFNaNbNcNiNjNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ75__T8opAssignTS3gmp1z40__T10MpzAddExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzAddExprZ8opAssignMFNaNbNcNiNjNeKS3gmp1z40__T10MpzAddExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzAddExprZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ75__T8opAssignTS3gmp1z40__T10MpzAddExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzAddExprZ8opAssignMFNaNbNcNiNjNeS3gmp1z40__T10MpzAddExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzAddExprZS3gmp1z3MpZ in psi4.o
  "___gmpz_add_ui", referenced from:
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2bTmZ10opOpAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2bTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2dTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2bTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2bTmZ8opBinaryMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_2bTmZ13opBinaryRightMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2dTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      ...
  "___gmpz_and", referenced from:
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_26Z8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_26Z10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_clear", referenced from:
      _D3gmp1z3MpZ6__dtorMFNaNbNiNeZv in psi4.o
  "___gmpz_clrbit", referenced from:
      _D3gmp1z3MpZ8clearBitMFNaNbNiNemZv in psi4.o
  "___gmpz_cmp", referenced from:
      _D3gmp1z3MpZ13__T8opEqualsZ8opEqualsMxFNaNbNiNexS3gmp1z3MpZZb in psi4.o
      _D3gmp1z3MpZ13__T8opEqualsZ8opEqualsMxFNaNbNiNeKxS3gmp1z3MpZZb in psi4.o
      _D3gmp1z3MpZ10__T5opCmpZ5opCmpMxFNaNbNiNeKxS3gmp1z3MpZZi in psi4.o
      _D3gmp1z3MpZ10__T5opCmpZ5opCmpMxFNaNbNiNexS3gmp1z3MpZZi in psi4.o
  "___gmpz_cmp_d", referenced from:
      _D3gmp1z3MpZ15__T8opEqualsTfZ8opEqualsMxFNaNbNiNefZb in psi4.o
      _D3gmp1z3MpZ15__T8opEqualsTdZ8opEqualsMxFNaNbNiNedZb in psi4.o
      _D3gmp1z3MpZ12__T5opCmpTdZ5opCmpMxFNaNbNiNedZi in psi4.o
  "___gmpz_cmp_si", referenced from:
      _D3gmp1z3MpZ15__T8opEqualsTiZ8opEqualsMxFNaNbNiNeiZb in psi4.o
      _D3gmp1z3MpZ12__T5opCmpTiZ5opCmpMxFNaNbNiNeiZi in psi4.o
      _D3gmp1z3MpZ12__T5opCmpTlZ5opCmpMxFNaNbNiNelZi in psi4.o
      _D3gmp1z3MpZ15__T8opEqualsTlZ8opEqualsMxFNaNbNiNelZb in psi4.o
      _D3gmp1z3MpZ16__T8opEqualsTyiZ8opEqualsMxFNaNbNiNeyiZb in psi4.o
      _D3gmp1z3MpZ13__T5opCmpTxiZ5opCmpMxFNaNbNiNexiZi in psi4.o
  "___gmpz_cmp_ui", referenced from:
      _D3gmp1z3MpZ15__T8opEqualsTkZ8opEqualsMxFNaNbNiNekZb in psi4.o
      _D3gmp1z3MpZ15__T8opEqualsTmZ8opEqualsMxFNaNbNiNemZb in psi4.o
      _D3gmp1z3MpZ12__T5opCmpTkZ5opCmpMxFNaNbNiNekZi in psi4.o
      _D3gmp1z3MpZ12__T5opCmpTmZ5opCmpMxFNaNbNiNemZi in psi4.o
  "___gmpz_cmpabs", referenced from:
      _D3gmp1z11__T6cmpabsZ6cmpabsFNaNbNiNexS3gmp1z3MpZxS3gmp1z3MpZZi in psi4.o
  "___gmpz_cmpabs_d", referenced from:
      _D3gmp1z11__T6cmpabsZ6cmpabsFNaNbNiNexS3gmp1z3MpZdZi in psi4.o
  "___gmpz_cmpabs_ui", referenced from:
      _D3gmp1z11__T6cmpabsZ6cmpabsFNaNbNiNexS3gmp1z3MpZmZi in psi4.o
  "___gmpz_com", referenced from:
      _D3gmp1z3MpZ14onesComplementMFNaNbNiNeZv in psi4.o
      _D3gmp1z20__T14onesComplementZ14onesComplementFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_combit", referenced from:
      _D3gmp1z3MpZ13complementBitMFNaNbNiNemZv in psi4.o
  "___gmpz_fits_sint_p", referenced from:
      _D3gmp1z3MpZ13__T6fitsInTiZ6fitsInMxFNaNbNiNeZb in psi4.o
  "___gmpz_fits_slong_p", referenced from:
      _D3gmp1z3MpZ13__T6fitsInTlZ6fitsInMxFNaNbNiNeZb in psi4.o
  "___gmpz_fits_sshort_p", referenced from:
      _D3gmp1z3MpZ13__T6fitsInTsZ6fitsInMxFNaNbNiNeZb in psi4.o
  "___gmpz_fits_uint_p", referenced from:
      _D3gmp1z3MpZ13__T6fitsInTkZ6fitsInMxFNaNbNiNeZb in psi4.o
  "___gmpz_fits_ulong_p", referenced from:
      _D3gmp1z3MpZ13__T6fitsInTmZ6fitsInMxFNaNbNiNeZb in psi4.o
  "___gmpz_fits_ushort_p", referenced from:
      _D3gmp1z3MpZ13__T6fitsInTtZ6fitsInMxFNaNbNiNeZb in psi4.o
  "___gmpz_gcd", referenced from:
      _D3gmp1z8__T3gcdZ3gcdFNaNbNiNexS3gmp1z3MpZxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z8__T3gcdZ3gcdFNaNbNiNeKxS3gmp1z3MpZKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z8__T3gcdZ3gcdFNaNbNiNeKxS3gmp1z3MpZxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_gcd_ui", referenced from:
      _D3gmp1z8__T3gcdZ3gcdFNaNbNiNexS3gmp1z3MpZmZS3gmp1z3MpZ in psi4.o
      _D3gmp1z8__T3gcdZ3gcdFNaNbNiNeKxS3gmp1z3MpZmZS3gmp1z3MpZ in psi4.o
  "___gmpz_get_d", referenced from:
      _D3gmp1z3MpZ13__T6opCastTdZ6opCastMxFNaNbNiNeZd in psi4.o
  "___gmpz_get_si", referenced from:
      _D3gmp1z3MpZ6toLongMxFNaNbNiNeZl in psi4.o
      _D3gmp1z3MpZ5toIntMxFNaNbNiNeZi in psi4.o
      _D3gmp1z3MpZ13__T6opCastTlZ6opCastMxFNaNbNiNeZl in psi4.o
      _D3gmp1z3MpZ13__T6opCastTiZ6opCastMxFNaNbNiNeZi in psi4.o
      _D3gmp1z3MpZ13__T6opCastTgZ6opCastMxFNaNbNiNeZg in psi4.o
      _D3gmp1z3MpZ13__T6opCastTsZ6opCastMxFNaNbNiNeZs in psi4.o
  "___gmpz_get_str", referenced from:
      _D3gmp1z3MpZ8toStringMxFNaNbNekbZAya in psi4.o
  "___gmpz_get_ui", referenced from:
      _D3gmp1z3MpZ13__T6opCastTmZ6opCastMxFNaNbNiNeZm in psi4.o
      _D3gmp1z3MpZ13__T6opCastThZ6opCastMxFNaNbNiNeZh in psi4.o
      _D3gmp1z3MpZ13__T6opCastTtZ6opCastMxFNaNbNiNeZt in psi4.o
      _D3gmp1z3MpZ13__T6opCastTkZ6opCastMxFNaNbNiNeZk in psi4.o
  "___gmpz_init", referenced from:
      _D3gmp1z3MpZ10initializeMFNaNbNiNeZv in psi4.o
  "___gmpz_init_set", referenced from:
      _D3gmp1z3MpZ3dupMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
  "___gmpz_init_set_d", referenced from:
      _D3gmp1z3MpZ13__T6__ctorTdZ6__ctorMFNaNbNcNiNedZS3gmp1z3MpZ in psi4.o
  "___gmpz_init_set_si", referenced from:
      _D3gmp1z3MpZ13__T6__ctorTiZ6__ctorMFNaNbNcNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ14__T6__ctorTyiZ6__ctorMFNaNbNcNiNeyiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ13__T6__ctorTlZ6__ctorMFNaNbNcNiNelZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ13__T6__ctorTsZ6__ctorMFNaNbNcNiNesZS3gmp1z3MpZ in psi4.o
  "___gmpz_init_set_str", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in psi4.o
  "___gmpz_init_set_ui", referenced from:
      _D3gmp1z3MpZ13__T6__ctorTkZ6__ctorMFNaNbNcNiNekZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ13__T6__ctorTmZ6__ctorMFNaNbNcNiNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ13__T6__ctorTtZ6__ctorMFNaNbNcNiNetZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ14__T6__ctorTymZ6__ctorMFNaNbNcNiNeymZS3gmp1z3MpZ in psi4.o
  "___gmpz_ior", referenced from:
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_7cZ8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_7cZ10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_lcm", referenced from:
      _D3gmp1z8__T3lcmZ3lcmFNaNbNiNexS3gmp1z3MpZxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z8__T3lcmZ3lcmFNaNbNiNeKxS3gmp1z3MpZKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z8__T3lcmZ3lcmFNaNbNiNeKxS3gmp1z3MpZxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_lcm_ui", referenced from:
      _D3gmp1z8__T3lcmZ3lcmFNaNbNiNexS3gmp1z3MpZmZS3gmp1z3MpZ in psi4.o
      _D3gmp1z8__T3lcmZ3lcmFNaNbNiNeKxS3gmp1z3MpZmZS3gmp1z3MpZ in psi4.o
  "___gmpz_mul", referenced from:
      _D3gmp1z40__T10MpzMulExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzMulExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2aZ8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_2aZ10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2aZ8opBinaryMxFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ75__T8opAssignTS3gmp1z40__T10MpzMulExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzMulExprZ8opAssignMFNaNbNcNiNjNeKS3gmp1z40__T10MpzMulExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzMulExprZS3gmp1z3MpZ in psi4.o
  "___gmpz_mul_si", referenced from:
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2aTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2aTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
  "___gmpz_mul_ui", referenced from:
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2aTmZ10opOpAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2aTmZ8opBinaryMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_2aTmZ13opBinaryRightMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
  "___gmpz_neg", referenced from:
      _D3gmp1z28__T10MpzNegExprTS3gmp1z3MpZZ10MpzNegExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ63__T8opAssignTS3gmp1z28__T10MpzNegExprTS3gmp1z3MpZZ10MpzNegExprZ8opAssignMFNaNbNcNiNjNeKS3gmp1z28__T10MpzNegExprTS3gmp1z3MpZZ10MpzNegExprZS3gmp1z3MpZ in psi4.o
  "___gmpz_nextprime", referenced from:
      _D3gmp1z14__T9nextPrimeZ9nextPrimeFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z14__T9nextPrimeZ9nextPrimeFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_popcount", referenced from:
      _D3gmp1z3MpZ15populationCountMxFNaNbNdNiNeZm in psi4.o
  "___gmpz_pow_ui", referenced from:
      _D3gmp1z31__T11MpzPowUExprTS3gmp1z3MpZTmZ11MpzPowUExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ29__T10opOpAssignVAyaa2_5e5eTmZ10opOpAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ29__T10opOpAssignVAyaa2_5e5eTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ26__T8opBinaryVAyaa2_5e5eTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ26__T8opBinaryVAyaa2_5e5eTlZ8opBinaryMxFNaNbNiNelZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ26__T8opBinaryVAyaa2_5e5eTmZ8opBinaryMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ29__T10opOpAssignVAyaa2_5e5eTlZ10opOpAssignMFNaNbNcNiNjNelZS3gmp1z3MpZ in psi4.o
      ...
  "___gmpz_powm", referenced from:
      _D3gmp1z9__T4powmZ4powmFNaNbNiNexS3gmp1z3MpZxS3gmp1z3MpZxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z9__T4powmZ4powmFNaNbNiNeKxS3gmp1z3MpZKxS3gmp1z3MpZKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_powm_ui", referenced from:
      _D3gmp1z44__T12MpzPowMUExprTS3gmp1z3MpZTmTS3gmp1z3MpZZ12MpzPowMUExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z9__T4powmZ4powmFNaNbNiNexS3gmp1z3MpZmxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_set", referenced from:
      _D3gmp1z3MpZ13__T8opAssignZ8opAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "___gmpz_set_d", referenced from:
      _D3gmp1z3MpZ15__T8opAssignTdZ8opAssignMFNaNbNcNiNjNedZS3gmp1z3MpZ in psi4.o
  "___gmpz_set_si", referenced from:
      _D3gmp1z3MpZ15__T8opAssignTiZ8opAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
  "___gmpz_set_str", referenced from:
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in psi4.o
  "___gmpz_set_ui", referenced from:
      _D3gmp1z3MpZ15__T8opAssignTmZ8opAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
  "___gmpz_setbit", referenced from:
      _D3gmp1z3MpZ6setBitMFNaNbNiNemZv in psi4.o
  "___gmpz_sizeinbase", referenced from:
      _D3gmp1z3MpZ10sizeInBaseMxFNaNbNiNekZm in psi4.o
  "___gmpz_sub", referenced from:
      _D3gmp1z40__T10MpzSubExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzSubExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2dZ8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_2dZ10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2dZ8opBinaryMxFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ75__T8opAssignTS3gmp1z40__T10MpzSubExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzSubExprZ8opAssignMFNaNbNcNiNjNeKS3gmp1z40__T10MpzSubExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzSubExprZS3gmp1z3MpZ in psi4.o
  "___gmpz_sub_ui", referenced from:
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2dTmZ10opOpAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2bTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2dTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2bTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2dTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_2dTiZ13opBinaryRightMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2dTmZ8opBinaryMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
      ...
  "___gmpz_tdiv_q", referenced from:
      _D3gmp1z40__T10MpzDivExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzDivExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2fZ8opBinaryMxFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_2fZ8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_2fZ10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_2fTiZ13opBinaryRightMxFNaNbNiNeiZi in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_2fTmZ13opBinaryRightMxFNaNbNiNemZm in psi4.o
      _D3gmp1z3MpZ75__T8opAssignTS3gmp1z40__T10MpzDivExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzDivExprZ8opAssignMFNaNbNcNiNjNeKS3gmp1z40__T10MpzDivExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzDivExprZS3gmp1z3MpZ in psi4.o
      ...
  "___gmpz_tdiv_q_ui", referenced from:
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2fTmZ10opOpAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_2fTiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2fTiZ8opBinaryMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_2fTmZ8opBinaryMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
  "___gmpz_tdiv_r", referenced from:
      _D3gmp1z40__T10MpzModExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzModExpr4evalMxFNaNbNiNeZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_25Z8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_25Z10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_25TiZ13opBinaryRightMxFNaNbNiNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_25TmZ13opBinaryRightMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_25Z8opBinaryMxFNaNbNiNeKxS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ75__T8opAssignTS3gmp1z40__T10MpzModExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzModExprZ8opAssignMFNaNbNcNiNjNeKS3gmp1z40__T10MpzModExprTS3gmp1z3MpZTS3gmp1z3MpZZ10MpzModExprZS3gmp1z3MpZ in psi4.o
      ...
  "___gmpz_tdiv_r_ui", referenced from:
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_25TmZ10opOpAssignMFNaNbNcNiNjNemZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ27__T10opOpAssignVAyaa1_25TiZ10opOpAssignMFNaNbNcNiNjNeiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ24__T8opBinaryVAyaa1_25TiZ8opBinaryMxFNaNbNiNeiZi in psi4.o
      _D3gmp1z3MpZ25__T8opBinaryVAyaa1_25TymZ8opBinaryMxFNaNbNiNeymZm in psi4.o
      _D3gmp1z3MpZ25__T8opBinaryVAyaa1_25TykZ8opBinaryMxFNaNbNiNeykZk in psi4.o
      _D3gmp1z3MpZ25__T8opBinaryVAyaa1_25TytZ8opBinaryMxFNaNbNiNeytZt in psi4.o
      _D3gmp1z3MpZ25__T8opBinaryVAyaa1_25TyhZ8opBinaryMxFNaNbNiNeyhZh in psi4.o
      ...
  "___gmpz_tstbit", referenced from:
      _D3gmp1z3MpZ7testBitMxFNaNbNiNemZb in psi4.o
  "___gmpz_ui_pow_ui", referenced from:
      _D3gmp1z3MpZ12__T3powTmTmZ3powFNaNbNiNemmZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ12__T3powTmTiZ3powFNaNbNiNemiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ12__T3powTiTiZ3powFNaNbNiNeiiZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ13__T3powTmTymZ3powFNaNbNiNemymZS3gmp1z3MpZ in psi4.o
  "___gmpz_ui_sub", referenced from:
      _D3gmp1z3MpZ30__T13opBinaryRightVAyaa1_2dTmZ13opBinaryRightMxFNaNbNiNemZS3gmp1z3MpZ in psi4.o
  "___gmpz_xor", referenced from:
      _D3gmp1z3MpZ22__T8opBinaryVAyaa1_5eZ8opBinaryMxFNaNbNiNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ25__T10opOpAssignVAyaa1_5eZ10opOpAssignMFNaNbNcNiNjNexS3gmp1z3MpZZS3gmp1z3MpZ in psi4.o
  "free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in psi4.o
     (maybe you meant: _D2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap8freeNodeFNbNiPS2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap4NodeZv, _D2gc4impl12conservative2gc15LargeObjectPool9freePagesMFNbmmZv , _D2gc4impl6manual2gc8ManualGC4freeMFNbPvZv , _D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZv , _D2rt5minfo11ModuleGroup4freeMFZv , _D2gc4impl12conservative2gc14ConservativeGC163__T9runLockedS63_D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZvS37_D2gc4impl12conservative2gc8freeTimelS37_D2gc4impl12conservative2gc8numFreeslTPvZ9runLockedMFNbKPvZv , _D2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap8freeNodeFNbNiPS2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap4NodeZv , _D2rt7dwarfeh15ExceptionHeader4freeFPS2rt7dwarfeh15ExceptionHeaderZv , _D2gc4impl12conservative2gc3Gcx8log_freeMFNbPvZv , _D2gc4impl12conservative2gc8freeTimel , _D3std3uni32__T8CowArrayTS3std3uni8GcPolicyZ8CowArray17freeThisReferenceMFNaNbNiNfZv , _D2gc4impl12conservative2gc4Pool12freePageBitsMFNbmKxG4mZv , _D4core6memory2GC4freeFNaNbPvZv , _D5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D5dexpr4Dℚ8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DDelta8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZ18__T9__lambda2TAyaZ9__lambda2MFAyaZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DVal8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10Identifier12freeVarsImplMFMDFAyaZiZi , _D10expression10Expression8freeVarsMFZS10expression10Expression8FreeVars , _D10expression34__T8UnaryExpVE5lexer9TokenTypei39Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr8DIUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DIndex8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLog8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression6IteExp12freeVarsImplMFMDFAyaZiZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei53Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKAyaKC5dexpr5DExprZi , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression8TupleExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars8opAssignMFNaNbNcNiNjNeS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr5DExpr8freeVarsMFZ8FreeVars14__aggrPostblitMFNaNbNiNfZv , _D5dexpr5DExpr8freeVarsMFZ8FreeVars7opApplyMFMDFC5dexpr4DVarZiZi , _D10bruteforce4Dist12freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKC5dexpr5DExprKC5dexpr5DExprZi , _D10bruteforce4Dist12freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8FieldExp12freeVarsImplMFMDFAyaZiZi , _D9hashtable45__T5shsetTS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ5shsetFS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS9hashtable23__T5SHSetTC5dexpr4DVarZ5SHSet , _D5dexpr5DExpr8freeVarsMFNaNbNiNfZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr10DNormalize8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DPow8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type7ArrayTy12freeVarsImplMFMDFAyaZiZi , _D11declaration11Declaration8__mixin812freeVarsImplMFMDFAyaZiZi , _D10expression8ErrorExp8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _gc_free , _D5dexpr5DBind8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr10DDiscDelta8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9LambdaExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D43TypeInfo_S5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei95Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DSin8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type11AggregateTy8__mixin512freeVarsImplMFMDFAyaZiZi , _D4type6TypeTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZi , _D4type8StringTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D4type9ContextTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D4type5ℝTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr10DDistApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression7CallExp12freeVarsImplMFMDFAyaZiZi , _D10expression11CompoundExp8__mixin612freeVarsImplMFMDFAyaZiZi , _D4type7ErrorTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInf8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr2DE8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10bruteforce6DBFFun8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DCeil8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression17TypeAnnotationExp12freeVarsImplMFMDFAyaZiZi , _D10bruteforce13DBFContextFun8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9AssertExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression10ABinaryExp12freeVarsImplMFMDFAyaZiZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei47Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DErr8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei49Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloor8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DAbs8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei66Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DIvr8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars9__xtoHashFNbNeKxS5dexpr5DExpr8freeVarsMFZ8FreeVarsZm , _D10expression9ReturnExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression8ArrayExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DArray8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8WhileExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D10expression9RepeatExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D4type7TupleTy12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression14PlaceholderExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D7distrib12Distribution7freeVarMFAyaZv , _D5dexpr8DRUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D2gc4impl12conservative2gc14ConservativeGC4freeMFNbPvZv , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DField8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DCat8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DSlice9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DTuple8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr9DGaussInt8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr12DDeBruijnVar8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8IndexExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloat8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List8freeNodeMFPS3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List4NodeZv , _D5dexpr5DNVar8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D11declaration12SingleDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D10bruteforce7DBFDist8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10LiteralExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D11declaration12CompoundDecl8__mixin612freeVarsImplMFMDFAyaZiZi , _D5dexpr3DΠ8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D9hashtable45__T5shsetTS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ5shsetFS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ14__foreachbody3MFC5dexpr4DVarZi , _D11declaration11MultiDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression10ObserveExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression11CObserveExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression6ForExp9__mixin1312freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8SliceExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi )
  "malloc", referenced from:
      _D3gmp1z3MpZ19_allocStringzCopyOfMFNaNbNiNexAyaZPa in psi4.o
     (maybe you meant: _D2gc4impl6manual2gc8ManualGC6mallocMFNbmkxC8TypeInfoZPv, _D2gc4impl12conservative2gc14ConservativeGC207__T9runLockedS83_D2gc4impl12conservative2gc14ConservativeGC13reallocNoSyncMFNbPvmKkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTPvTmTkTmTxC8TypeInfoZ9runLockedMFNbKPvKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv , _D2rt4util9container6common7xmallocFNbNimZPv , _gc_malloc , _D4core6memory2GC6mallocFNaNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc3Gcx10log_mallocMFNbPvmZv , _D3std5regex8internal2ir19__T11mallocArrayTmZ11mallocArrayFNbNimZAm , _D4util23__T14mallocAppenderTAaZ14mallocAppenderFNbNimZS4util24__T14MallocAppenderHTAaZ14MallocAppender , _D4util24__T14mallocAppenderTAyaZ14mallocAppenderFNbNimZS4util25__T14MallocAppenderHTAyaZ14MallocAppender , _D2gc4impl12conservative2gc10mallocTimel , _D2gc4impl12conservative2gc14ConservativeGC200__T9runLockedS79_D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTmTkTmTxC8TypeInfoZ9runLockedMFNbKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPv )
ld: symbol(s) not found for architecture x86_64
nordlow commented 7 years ago

That last call to dmd doesn't include -L-lgmp. That's the reason why it doesn't find the symbols starting with __gmpz.

Try adding "gmp" to "libs" in all your dub-files.

I recommend you to start a thread about this at http://forum.dlang.org/group/learn if you can't find it documented on https://code.dlang.org/package-format?lang=json.

A suitable title is: "Transitive link dependencies in DUB".

bvoq commented 7 years ago

Thanks a lot, I didn't include gmp as you said. I still get the free and malloc error though.

nordlow commented 7 years ago

The order of "gmp" and "c" is important for some linkers. The "c" should come last in the libs spec because libgmp functions may call libc-functions.

Linkers are unfortunately still very dumb is some cases.

bvoq commented 7 years ago

Wow, that's pretty ridiculous. The order didn't fix it though, I still get:

Undefined symbols for architecture x86_64:
  "free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in psi4.o
     (maybe you meant: _D2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap8freeNodeFNbNiPS2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap4NodeZv, _D2gc4impl12conservative2gc15LargeObjectPool9freePagesMFNbmmZv , _D2gc4impl6manual2gc8ManualGC4freeMFNbPvZv , _D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZv , _D2rt5minfo11ModuleGroup4freeMFZv , _D2gc4impl12conservative2gc14ConservativeGC163__T9runLockedS63_D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZvS37_D2gc4impl12conservative2gc8freeTimelS37_D2gc4impl12conservative2gc8numFreeslTPvZ9runLockedMFNbKPvZv , _D2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap8freeNodeFNbNiPS2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap4NodeZv , _D2rt7dwarfeh15ExceptionHeader4freeFPS2rt7dwarfeh15ExceptionHeaderZv , _D2gc4impl12conservative2gc3Gcx8log_freeMFNbPvZv , _D2gc4impl12conservative2gc8freeTimel , _D3std3uni32__T8CowArrayTS3std3uni8GcPolicyZ8CowArray17freeThisReferenceMFNaNbNiNfZv , _D2gc4impl12conservative2gc4Pool12freePageBitsMFNbmKxG4mZv , _D4core6memory2GC4freeFNaNbPvZv , _D5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D5dexpr4Dℚ8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DDelta8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZ18__T9__lambda2TAyaZ9__lambda2MFAyaZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DVal8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10Identifier12freeVarsImplMFMDFAyaZiZi , _D10expression10Expression8freeVarsMFZS10expression10Expression8FreeVars , _D10expression34__T8UnaryExpVE5lexer9TokenTypei39Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr8DIUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DIndex8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLog8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression6IteExp12freeVarsImplMFMDFAyaZiZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei53Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKAyaKC5dexpr5DExprZi , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression8TupleExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars8opAssignMFNaNbNcNiNjNeS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr5DExpr8freeVarsMFZ8FreeVars14__aggrPostblitMFNaNbNiNfZv , _D5dexpr5DExpr8freeVarsMFZ8FreeVars7opApplyMFMDFC5dexpr4DVarZiZi , _D10bruteforce4Dist12freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKC5dexpr5DExprKC5dexpr5DExprZi , _D10bruteforce4Dist12freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8FieldExp12freeVarsImplMFMDFAyaZiZi , _D9hashtable45__T5shsetTS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ5shsetFS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS9hashtable23__T5SHSetTC5dexpr4DVarZ5SHSet , _D5dexpr5DExpr8freeVarsMFNaNbNiNfZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr10DNormalize8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DPow8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type7ArrayTy12freeVarsImplMFMDFAyaZiZi , _D11declaration11Declaration8__mixin812freeVarsImplMFMDFAyaZiZi , _D10expression8ErrorExp8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _gc_free , _D5dexpr5DBind8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr10DDiscDelta8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9LambdaExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D43TypeInfo_S5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei95Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DSin8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type11AggregateTy8__mixin512freeVarsImplMFMDFAyaZiZi , _D4type6TypeTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZi , _D4type8StringTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D4type9ContextTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D4type5ℝTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr10DDistApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression7CallExp12freeVarsImplMFMDFAyaZiZi , _D10expression11CompoundExp8__mixin612freeVarsImplMFMDFAyaZiZi , _D4type7ErrorTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInf8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr2DE8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10bruteforce6DBFFun8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DCeil8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression17TypeAnnotationExp12freeVarsImplMFMDFAyaZiZi , _D10bruteforce13DBFContextFun8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9AssertExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression10ABinaryExp12freeVarsImplMFMDFAyaZiZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei47Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DErr8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei49Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloor8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DAbs8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei66Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DIvr8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars9__xtoHashFNbNeKxS5dexpr5DExpr8freeVarsMFZ8FreeVarsZm , _D10expression9ReturnExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression8ArrayExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DArray8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8WhileExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D10expression9RepeatExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D4type7TupleTy12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression14PlaceholderExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D7distrib12Distribution7freeVarMFAyaZv , _D5dexpr8DRUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D2gc4impl12conservative2gc14ConservativeGC4freeMFNbPvZv , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DField8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DCat8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DSlice9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DTuple8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr9DGaussInt8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr12DDeBruijnVar8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8IndexExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloat8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List8freeNodeMFPS3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List4NodeZv , _D5dexpr5DNVar8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D11declaration12SingleDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D10bruteforce7DBFDist8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10LiteralExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D11declaration12CompoundDecl8__mixin612freeVarsImplMFMDFAyaZiZi , _D5dexpr3DΠ8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D9hashtable45__T5shsetTS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ5shsetFS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ14__foreachbody3MFC5dexpr4DVarZi , _D11declaration11MultiDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression10ObserveExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression11CObserveExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression6ForExp9__mixin1312freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8SliceExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi )
  "malloc", referenced from:
      _D3gmp1z3MpZ19_allocStringzCopyOfMFNaNbNiNexAyaZPa in psi4.o
     (maybe you meant: _D2gc4impl6manual2gc8ManualGC6mallocMFNbmkxC8TypeInfoZPv, _D2gc4impl12conservative2gc14ConservativeGC207__T9runLockedS83_D2gc4impl12conservative2gc14ConservativeGC13reallocNoSyncMFNbPvmKkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTPvTmTkTmTxC8TypeInfoZ9runLockedMFNbKPvKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv , _D2rt4util9container6common7xmallocFNbNimZPv , _gc_malloc , _D4core6memory2GC6mallocFNaNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc3Gcx10log_mallocMFNbPvmZv , _D3std5regex8internal2ir19__T11mallocArrayTmZ11mallocArrayFNbNimZAm , _D4util23__T14mallocAppenderTAaZ14mallocAppenderFNbNimZS4util24__T14MallocAppenderHTAaZ14MallocAppender , _D4util24__T14mallocAppenderTAyaZ14mallocAppenderFNbNimZS4util25__T14MallocAppenderHTAyaZ14MallocAppender , _D2gc4impl12conservative2gc10mallocTimel , _D2gc4impl12conservative2gc14ConservativeGC200__T9runLockedS79_D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTmTkTmTxC8TypeInfoZ9runLockedMFNbKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPv )
ld: symbol(s) not found for architecture x86_64
nordlow commented 7 years ago

Yeah, I know.

Can you, please, give the command line aswell?

bvoq commented 7 years ago

Any of the following lead to the problem: Running dub test within your gmp-d project. Running the project which uses gmp-d. This is the full message (with both commands):

dmd -c -of.dub/build/application-debug-posix.osx-x86_64-dmd_2074-508476B0A89D7D55F6705B7396812947/psi4.o -debug -g -unittest -version=Have_psi4 -Isource/ source/app.d source/approximate.d source/asymptotics.d source/backend.d source/bruteforce.d source/declaration.d source/dexpr.d source/differentiation.d source/distrib.d source/dparse.d source/error.d source/expression.d source/findcriticalvalues.d source/gmp/dbgio.d source/gmp/f.d source/gmp/package.d source/gmp/q.d source/gmp/traits.d source/gmp/z.d source/hashtable.d source/help.d source/integration.d source/intervalarithmetic.d source/intervalarithmeticdefinitionranges.d source/lexer.d source/limits.d source/numericevaluation.d source/numericintegration.d source/options.d source/parser.d source/psi.d source/renormalization.d source/scope_.d source/semantic_.d source/solve.d source/summarize.d source/summation.d source/symbolic.d source/terminal.d source/type.d source/util.d -vcolumns
Linking...
dmd -of.dub/build/application-debug-posix.osx-x86_64-dmd_2074-508476B0A89D7D55F6705B7396812947/psi4 .dub/build/application-debug-posix.osx-x86_64-dmd_2074-508476B0A89D7D55F6705B7396812947/psi4.o -L-lgmp -L-lc -g
Undefined symbols for architecture x86_64:
  "free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in psi4.o
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in psi4.o
     (maybe you meant: _D2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap8freeNodeFNbNiPS2rt4util9container5treap33__T5TreapTS2gc11gcinterface4RootZ5Treap4NodeZv, _D2gc4impl12conservative2gc15LargeObjectPool9freePagesMFNbmmZv , _D2gc4impl6manual2gc8ManualGC4freeMFNbPvZv , _D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZv , _D2rt5minfo11ModuleGroup4freeMFZv , _D2gc4impl12conservative2gc14ConservativeGC163__T9runLockedS63_D2gc4impl12conservative2gc14ConservativeGC10freeNoSyncMFNbPvZvS37_D2gc4impl12conservative2gc8freeTimelS37_D2gc4impl12conservative2gc8numFreeslTPvZ9runLockedMFNbKPvZv , _D2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap8freeNodeFNbNiPS2rt4util9container5treap34__T5TreapTS2gc11gcinterface5RangeZ5Treap4NodeZv , _D2rt7dwarfeh15ExceptionHeader4freeFPS2rt7dwarfeh15ExceptionHeaderZv , _D2gc4impl12conservative2gc3Gcx8log_freeMFNbPvZv , _D2gc4impl12conservative2gc8freeTimel , _D3std3uni32__T8CowArrayTS3std3uni8GcPolicyZ8CowArray17freeThisReferenceMFNaNbNiNfZv , _D2gc4impl12conservative2gc4Pool12freePageBitsMFNbmKxG4mZv , _D4core6memory2GC4freeFNaNbPvZv , _D5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D5dexpr4Dℚ8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DDelta8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZ18__T9__lambda2TAyaZ9__lambda2MFAyaZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DVal8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10Identifier12freeVarsImplMFMDFAyaZiZi , _D10expression10Expression8freeVarsMFZS10expression10Expression8FreeVars , _D10expression34__T8UnaryExpVE5lexer9TokenTypei39Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr8DIUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DIndex8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLog8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression6IteExp12freeVarsImplMFMDFAyaZiZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei53Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKAyaKC5dexpr5DExprZi , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D5dexpr5DDiff9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DSum9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression8TupleExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars8opAssignMFNaNbNcNiNjNeS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr5DExpr8freeVarsMFZ8FreeVars14__aggrPostblitMFNaNbNiNfZv , _D5dexpr5DExpr8freeVarsMFZ8FreeVars7opApplyMFMDFC5dexpr4DVarZiZi , _D10bruteforce4Dist12freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFKC5dexpr5DExprKC5dexpr5DExprZi , _D10bruteforce4Dist12freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8FieldExp12freeVarsImplMFMDFAyaZiZi , _D9hashtable45__T5shsetTS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ5shsetFS5dexpr5DExpr8freeVarsMFZ8FreeVarsZS9hashtable23__T5SHSetTC5dexpr4DVarZ5SHSet , _D5dexpr5DExpr8freeVarsMFNaNbNiNfZS5dexpr5DExpr8freeVarsMFZ8FreeVars , _D5dexpr10DNormalize8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DPow8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type7ArrayTy12freeVarsImplMFMDFAyaZiZi , _D11declaration11Declaration8__mixin812freeVarsImplMFMDFAyaZiZi , _D10expression8ErrorExp8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _gc_free , _D5dexpr5DBind8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr10DDiscDelta8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9LambdaExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D43TypeInfo_S5dexpr5DExpr8freeVarsMFZ8FreeVars6__initZ , _D5dexpr6DBitOr8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr4DVarZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei95Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DSin8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D4type11AggregateTy8__mixin512freeVarsImplMFMDFAyaZiZi , _D4type6TypeTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D4type8ForallTy12freeVarsImplMFMDFAyaZiZi , _D4type8StringTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D4type9ContextTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D4type5ℝTy8__mixin412freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInt9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr10DDistApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression7CallExp12freeVarsImplMFMDFAyaZiZi , _D10expression11CompoundExp8__mixin612freeVarsImplMFMDFAyaZiZi , _D4type7ErrorTy8__mixin312freeVarsImplMFMDFAyaZiZi , _D5dexpr4DInf8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DMCase8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr2DE8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10bruteforce6DBFFun8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DCeil8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression17TypeAnnotationExp12freeVarsImplMFMDFAyaZiZi , _D10bruteforce13DBFContextFun8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression9AssertExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression10ABinaryExp12freeVarsImplMFMDFAyaZiZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei47Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr4DErr8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression37__T10PostfixExpVE5lexer9TokenTypei49Z10PostfixExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloor8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DAbs8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression34__T8UnaryExpVE5lexer9TokenTypei66Z8UnaryExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DApply8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DIvr8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr5DExpr8freeVarsMFZ8FreeVars9__xtoHashFNbNeKxS5dexpr5DExpr8freeVarsMFZ8FreeVarsZm , _D10expression9ReturnExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression8ArrayExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DArray8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8WhileExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D10expression9RepeatExp8__mixin712freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D4type7TupleTy12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression14PlaceholderExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D7distrib12Distribution7freeVarMFAyaZv , _D5dexpr8DRUpdate9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D2gc4impl12conservative2gc14ConservativeGC4freeMFNbPvZv , _D5dexpr4DLim8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DField8__mixin912freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr4DCat8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DSlice9__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DLambda9__mixin1112freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DRecord8__mixin712freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr6DTuple8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr9DGaussInt8__mixin812freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr7DBitAnd8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D5dexpr12DDeBruijnVar8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8IndexExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr6DFloat8__mixin412freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List8freeNodeMFPS3std11concurrency36__T4ListTS3std11concurrency7MessageZ4List4NodeZv , _D5dexpr5DNVar8__mixin512freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D11declaration12SingleDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D10bruteforce7DBFDist8__mixin612freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression10LiteralExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D11declaration12CompoundDecl8__mixin612freeVarsImplMFMDFAyaZiZi , _D5dexpr3DΠ8__mixin312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D9hashtable45__T5shsetTS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ5shsetFS5dexpr5DExpr8freeVarsMFZ8FreeVarsZ14__foreachbody3MFC5dexpr4DVarZi , _D11declaration11MultiDefExp8__mixin812freeVarsImplMFMDFAyaZiZi , _D5dexpr5DPlus9__mixin1312freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZ14__foreachbody3MFC5dexpr5DExprZi , _D10expression10ObserveExp8__mixin412freeVarsImplMFMDFAyaZiZi , _D10expression11CObserveExp8__mixin512freeVarsImplMFMDFAyaZiZi , _D10expression6ForExp9__mixin1312freeVarsImplMFMDFAyaZiZi , _D5dexpr7DBitXor8__mixin19__mixin1012freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi , _D10expression8SliceExp12freeVarsImplMFMDFAyaZiZi , _D5dexpr5DMult9__mixin1212freeVarsImplMFMDFC5dexpr4DVarZiKS9hashtable24__T5SHSetTC5dexpr5DExprZ5SHSetZi )
  "malloc", referenced from:
      _D3gmp1z3MpZ19_allocStringzCopyOfMFNaNbNiNexAyaZPa in psi4.o
     (maybe you meant: _D2gc4impl6manual2gc8ManualGC6mallocMFNbmkxC8TypeInfoZPv, _D2gc4impl12conservative2gc14ConservativeGC207__T9runLockedS83_D2gc4impl12conservative2gc14ConservativeGC13reallocNoSyncMFNbPvmKkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTPvTmTkTmTxC8TypeInfoZ9runLockedMFNbKPvKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC6mallocMFNbmkxC8TypeInfoZPv , _D2rt4util9container6common7xmallocFNbNimZPv , _gc_malloc , _D4core6memory2GC6mallocFNaNbmkxC8TypeInfoZPv , _D2gc4impl12conservative2gc3Gcx10log_mallocMFNbPvmZv , _D3std5regex8internal2ir19__T11mallocArrayTmZ11mallocArrayFNbNimZAm , _D4util23__T14mallocAppenderTAaZ14mallocAppenderFNbNimZS4util24__T14MallocAppenderHTAaZ14MallocAppender , _D4util24__T14mallocAppenderTAyaZ14mallocAppenderFNbNimZS4util25__T14MallocAppenderHTAyaZ14MallocAppender , _D2gc4impl12conservative2gc10mallocTimel , _D2gc4impl12conservative2gc14ConservativeGC200__T9runLockedS79_D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPvS40_D2gc4impl12conservative2gc10mallocTimelS40_D2gc4impl12conservative2gc10numMallocslTmTkTmTxC8TypeInfoZ9runLockedMFNbKmKkKmKxC8TypeInfoZPv , _D2gc4impl12conservative2gc14ConservativeGC12mallocNoSyncMFNbmkKmxC8TypeInfoZPv )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
nordlow commented 7 years ago

It doesn't happen on Linux where I sit so it's difficult to debug for me, unfortunately. My only guess is that the internal symbol names of malloc and free on Mac OS X are mangled to something other than what happens on Linux.

nordlow commented 7 years ago

I asked the forums: http://forum.dlang.org/post/duxbmgkkeioddyyauunx@forum.dlang.org

jacob-carlborg commented 7 years ago

I found the problem, short explanation:

These symbols [1] need to be extern(C), or even better not using pragma(mangle) at all.

Longer explanation:

The problem is these two lines [1]:

pragma(mangle, "malloc") void* qualifiedMalloc(size_t size);
pragma(mangle, "free") void qualifiedFree(void* ptr);

On macOS all C symbols are mangled with an underscore prefix, meaning the free and malloc symbols are actually named _free and _malloc in the binary.

This is easy to verify by:

$ cat main.c
void foo();

int main()
{
    foo();
    return 0;
}
$ clang main.c
Undefined symbols for architecture x86_64:
  "_foo", referenced from:
      _main in main-8a6861.o

Here we can see that the linker is looking for the _foo symbol, while in output in the previous posts it's looking for free, without the underscore prefix.

When pragma(mangle) is used on an extern(C) symbol the compiler will automatically handle the prefixing of the symbol on macOS, making it line up with any C symbols.

Functions with D linkage have their own mangling, prefixed with _D, the fully qualified name and the signature mangled. It seems like that when using pragma(mangle) on functions with D linkage the compiler will output the symbol exactly like it's specified in the source code, in pragma(mangle). This can be verified by:

$ cat main.d
void foo();

void main()
{
    foo();
}
$ dmd -c main.d
$ nm main.o | grep foo
U _D4main3fooFZv

And when using pragma(mangle):

$ cat main.d
pragma(mangle, "foo") void foo();

void main()
{
    foo();
}
$ dmd -c main.d
$ nm main.o | grep foo
U foo

No underscore prefix.

This happens to work on Linux because on Linux this mangling (with the underscore prefix) is not used for C symbols. But since the functions are not declared as extern(C) we're actually calling C functions using the D calling conventions, which just happens to work in this case because the C and D calling conventions are mostly the same.

[1] https://github.com/nordlow/gmp-d/blob/master/src/gmp/z.d#L1164-L1165

bvoq commented 7 years ago

I can confirm it works on my machine when using extern(C) {} around these two lines, thanks!

nordlow commented 7 years ago

I'll add a fix for this later today.

jacob-carlborg commented 7 years ago

What's the purpose of using different names for malloc and free from the beginning?

nordlow commented 7 years ago

Ask Apple :)

Compiler/OSes/Companies are free to implement their own compiler mangling.

jacob-carlborg commented 7 years ago

Ask Apple :)

I mean why qualifiedMalloc is used instead of core.stdc.stdlib.malloc?

nordlow commented 7 years ago

They aren't pure. But recently pureMalloc was added. No pureFree though.

I'm gonna add a patch that uses pureMalloc and write my own version of pureFree making the code in gmp-d that uses them @safe pure nothrow @nogc.

jacob-carlborg commented 7 years ago

Aha, I see. So you're cheating the type system 😉.

nordlow commented 7 years ago

I've pushed fixes on master now that uses pureMalloc and mangles free() to _free on OSX.

Is the mangling free for all non-OSX platforms?

jacob-carlborg commented 7 years ago

Is the mangling free for all non-OSX platforms?

Yes, as far as I know, at least on Posix. But that doesn't matter if you're using extern(C), then the compiler will handle that automatically. You should use extern(C), which you're not, not even after the fix.

nordlow commented 7 years ago

Ok, I qualified qualifiedFree as extern(C) on master.

nordlow commented 7 years ago

Ping, did my latest commit help?

bvoq commented 7 years ago

Partially, I now only get the following error when running dub test.

Linking...
Undefined symbols for architecture x86_64:
  "__free", referenced from:
      _D3gmp1z3MpZ6__ctorMFNaNbNcNiNexAyakZS3gmp1z3MpZ in gmp-d-test-library.o
      _D3gmp1z3MpZ10fromStringMFNaNbNcNiNjNexAyakZS3gmp1z3MpZ in gmp-d-test-library.o
ld: symbol(s) not found for architecture x86_64
bvoq commented 7 years ago

It seems to work if you remove extern(C) this time for some reason.

    // qualified C memory managment
    static @trusted pragma(inline, false)  // TODO locally `@trusted`
    {    
        version(linux)
        {    
            pragma(mangle, "free") void qualifiedFree(void* ptr);
        }    
        else version(OSX)
        {    
            pragma(mangle,"_free") void qualifiedFree(void* ptr);
        }
        else 
        {    
            pragma(mangle, "free") void qualifiedFree(void* ptr);
        }    
    }
jacob-carlborg commented 7 years ago

Ping, did my latest commit help?

@nordlow no. It should look like this:

static @safe pragma(inline, false) extern(C)
{
    pragma(mangle, "free") void qualifiedFree(void* ptr);
}

When a function has C linkage the compiler will automatically add the underscore prefix on macOS.

jacob-carlborg commented 7 years ago

It seems to work if you remove extern(C) this time for some reason.

That is not correct. A C function should be called with C linkage. It just happens to work because the C and D calling conventions are very similar, but not exactly the same.

nordlow commented 7 years ago

I've updated master accordingly:

static @trusted pragma(inline, false) extern(C) // locally `@trusted`
{
    version(linux)
    {
        pragma(mangle, "free") void qualifiedFree(void* ptr);
    }
    else version(OSX)
    {
        pragma(mangle, "free") void qualifiedFree(void* ptr);
    }
    else
    {
        pragma(mangle, "free") void qualifiedFree(void* ptr);
    }
}
jacob-carlborg commented 7 years ago

In my opinion the version statements are not necessary anymore, but it's up to you how to structure the code.

bvoq commented 7 years ago

It works on my end as well!

bvoq commented 7 years ago

I wasn't able to compile the library under ldc2 before, but now there is a malloc issue as well:

source/gmp/z.d(1139,16): Error: module core.memory import 'pureMalloc' not found
source/gmp/z.d(786,13): Error: function gmp.z.MpZ.opOpAssign!("+", ulong).opOpAssign functions cannot be scope
source/gmp/z.d(1487,7): Error: template instance gmp.z.MpZ.opOpAssign!("+", ulong) error instantiating
source/gmp/z.d(1487,7): Error: 'w += 100LU' is not a scalar, it is a MpZ
source/gmp/z.d(725,13): Error: function gmp.z.MpZ.opOpAssign!"-".opOpAssign functions cannot be scope
source/gmp/z.d(1490,7): Error: template instance gmp.z.MpZ.opOpAssign!"-" error instantiating
source/gmp/z.d(1490,7): Error: 'w -= ((MpZ __slMpZ10714 = MpZ(__mpz_struct(0, 0, null));) , __slMpZ10714).this(100)' is not a scalar, it is a MpZ
source/gmp/z.d(1493,7): Error: 'w += 100LU' is not a scalar, it is a MpZ
source/gmp/z.d(786,13): Error: function gmp.z.MpZ.opOpAssign!("-", ulong).opOpAssign functions cannot be scope
source/gmp/z.d(1496,7): Error: template instance gmp.z.MpZ.opOpAssign!("-", ulong) error instantiating
source/gmp/z.d(1496,7): Error: 'w -= 100LU' is not a scalar, it is a MpZ
source/gmp/z.d(786,13): Error: function gmp.z.MpZ.opOpAssign!("*", ulong).opOpAssign functions cannot be scope
source/gmp/z.d(1499,7): Error: template instance gmp.z.MpZ.opOpAssign!("*", ulong) error instantiating
source/gmp/z.d(1499,7): Error: 'w *= 100LU' is not a scalar, it is a MpZ
source/gmp/z.d(786,13): Error: function gmp.z.MpZ.opOpAssign!("/", ulong).opOpAssign functions cannot be scope
source/gmp/z.d(1502,7): Error: template instance gmp.z.MpZ.opOpAssign!("/", ulong) error instantiating
source/gmp/z.d(1502,7): Error: 'w /= 100LU' is not a scalar, it is a MpZ
source/gmp/z.d(786,13): Error: function gmp.z.MpZ.opOpAssign!("%", ulong).opOpAssign functions cannot be scope
source/gmp/z.d(1505,7): Error: template instance gmp.z.MpZ.opOpAssign!("%", ulong) error instantiating
nordlow commented 7 years ago

That's because it was added in D release 2.074.

I can copy the definition of pureMalloc from Phobos into gmp-d if you feel like.

bvoq commented 7 years ago

It is not necessary for me at the moment. Thanks for everything!

nordlow commented 7 years ago

I added a backport of pureMalloc that works with latest ldc 1.3.0.beta1 according to

dub test --compiler=ldc2 --build=release
nordlow commented 6 years ago

Is it ok to close this issue?

bvoq commented 6 years ago

yes, thank you!

bvoq commented 6 years ago

Actually nvm I just ran it and got:

MacBook-Pro-7:gmp-d kdkdk$ dub test --compiler=ldc2 --build=release
Generating test runner configuration 'gmp-d-test-library' for 'library' (library).
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Performing "release" build using ldc2 for x86_64.
gmp-d 0.1.1: building configuration "gmp-d-test-library"...
clang: error: invalid linker name in argument '-fuse-ld=gold'
Error: /usr/bin/gcc failed with status: 1
ldc2 failed with exit code 1.
jacob-carlborg commented 6 years ago

As far as I know, the gold linker is not available on macOS.

bvoq commented 6 years ago

Ah ok. Anyways, I was able to run the unittests concerning my interests, so from my point of view the issue can be closed. Thanks again.

nordlow commented 6 years ago

So what should we replace the dub.sdl-line

dflags "-Xcc=-fuse-ld=gold" platform="posix-ldc" # use GNU gold linker

with to make it happen on Linux but not Mac OS X?

jacob-carlborg commented 6 years ago
dflags "-Xcc=-fuse-ld=gold" platform="linux-ldc"
nordlow commented 6 years ago

Thanks. This has now been fixed in 0.1.2.

Ok to close this?

bvoq commented 6 years ago

It works on my side as well!

nordlow commented 6 years ago

Great, I'm closing this for now then.