Comments (6)
There shouldn't be any problem with musl.
Compiling your program should work with "bah merhaba.bah" (using gcc).
If you want to use TCC, you will need to pass the "-d" option to make the executable dynamicaly linked. Doing so will require you to have libgc.so installed on your system.
from bah.
Also, you can use "-verboseCC" to see the C compiler output without doing multiple commands.
from bah.
bah with gcc or tcc does give cc error:
bah merhaba.bah -verboseCC
Parsed. (2138 lines, total time: 13ms, lexer time: 3ms)
/an/duyum/etki/ld: /opt/bah/libs/linux//libgc.a(pthread_support.o): in functionsetup_mark_lock': /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/pthread_support.c:2508: undefined reference to
gnu_get_libc_version'
/an/duyum/etki/ld: /opt/bah/cache/aoptabahabuiltinbbah00.o.o: in function__BAH_panic': /opt/bah/<stdin>:285: undefined reference to
backtrace'
/an/duyum/etki/ld: /opt/bah/libs/linux//libgc.a(mach_dep.o): in functionGC_with_callee_saves_pushed': /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/mach_dep.c:345: undefined reference to
getcontext'
/an/duyum/etki/ld: /opt/bah/libs/linux//libgc.a(pthread_start.o): in functionGC_pthread_start_inner': /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/pthread_start.c:53: undefined reference to
__pthread_register_cancel'
/an/duyum/etki/ld: /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/pthread_start.c:62: undefined reference to `__pthread_unregister_cancel'
collect2: error: ld returned 1 exit status[CC-ERROR]
Could not compile.
from bah.
The Bah compiler links your executable with a static version of libgc shipped with the compiler by default.
- You may need to install libgc and link your executable dynamically instead (-d flag).
- Your version of libc does not have the backtrace() function implemented.
You can bypass the second problem easily by typing backtrace(arr ptr, l int) int {}
at the top of your program while I try to get rid of non posix functions. Note that doing this sketchy thing will break the panic() backtrace...
from bah.
backtrace error dissapeared but libgc error still persists:
bah merhaba.bah -verboseCC -d
Parsed. (2140 lines, total time: 17ms, lexer time: 4ms)
/an/duyum/etki/ld: /opt/bah/libs/linux//libgc.a(pthread_support.o): in functionsetup_mark_lock': /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/pthread_support.c:2508: undefined reference to
gnu_get_libc_version'
/an/duyum/etki/ld: /opt/bah/libs/linux//libgc.a(mach_dep.o): in functionGC_with_callee_saves_pushed': /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/mach_dep.c:345: undefined reference to
getcontext'
/an/duyum/etki/ld: /opt/bah/libs/linux//libgc.a(pthread_start.o): in functionGC_pthread_start_inner': /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/pthread_start.c:53: undefined reference to
__pthread_register_cancel'
/an/duyum/etki/ld: /run/media/alois/7E78027F78023685/prog/bdwgc/bdwgc/pthread_start.c:62: undefined reference to `__pthread_unregister_cancel'
collect2: error: ld returned 1 exit status
from bah.
libgc (https://github.com/ivmai/bdwgc) was made using the GNU libc.
I cannot guarantee that this library will work with Musl...
You can try compiling your program with "-lightGC" to remove the libgc dependency. Note that this is meant for really simple programs. lightgc.bah is still being developed.
from bah.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bah.