Morpho-lang / morpho

The Morpho language 🦋. Morpho is a small embeddable language for scientific computing applications.
MIT License
30 stars 10 forks source link

Ldl flag #216

Closed joshichaitanya3 closed 1 year ago

joshichaitanya3 commented 1 year ago

Some Linux installations aren't able to compile Morpho 0.5.6, with the following errors:

/usr/bin/ld: utils/common.o: in function `extensions_call':
common.c:(.text+0x2732): undefined reference to `dlsym'
/usr/bin/ld: utils/common.o: in function `morpho_loadextension':
common.c:(.text+0x295b): undefined reference to `dlopen'
/usr/bin/ld: common.c:(.text+0x2a4e): undefined reference to `dlsym'
/usr/bin/ld: utils/common.o: in function `extensions_finalize':
common.c:(.text+0x2bff): undefined reference to `dlsym'
/usr/bin/ld: common.c:(.text+0x2c3a): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make: *** [Makefile.linux:27: morpho5] Error 1

This is fixed by adding a -ldl flag to the LDFLAGS in Makefile.linux.