Comments (2)
also build and execute process is hard, plz make it easy
from libcsp.
I concur.
I spent 9 hours on this and found what appears to be a dead end:
> [7/7] RUN bash <<EOF:
0.136 /usr/bin/ld: /tmp/ccLBePAx.o (symbol from plugin): in function `main':
0.136 (.text+0x0): multiple definition of `main'; main.o (symbol from plugin):(.text+0x0): first defined here
0.161 /usr/bin/ld: /tmp/cc1sVYJL.ltrans0.ltrans.o: in function `csp___other_1_csp_main':
0.161 <artificial>:(.text+0x3d): undefined reference to `csp_main'
0.162 collect2: error: ld returned 1 exit status
------
Dockerfile:27
--------------------
26 |
27 | >>> RUN bash <<EOF
28 | >>> set -e
29 | >>> cspcli init --working-dir=.
30 | >>> $CC $CFLAGS -c main.c -o main.o \
31 | >>> -fplugin=libcsp -fplugin-arg-libcsp-working-dir=.
32 | >>> cspcli analyze --working-dir=.
33 | >>> $CC $CFLAGS -o app *.o *.c \
34 | >>> -pthread -lcsp
35 | >>> EOF
36 |
--------------------
I have no idea how to debug this further. I give up.
#include <libcsp/csp.h>
#include <stdio.h>
int main() {
printf("Hi Mom!");
return 0;
}
FROM debian:bookworm-slim
RUN apt update && apt install -y \
wget gcc-12 gcc-12-plugin-dev g++-12 make libtool autoconf automake
RUN mkdir app
WORKDIR app
ENV CC="gcc-12"
ENV CXX="g++-12"
ENV CFLAGS="-O3 -flto"
RUN bash <<EOF
set -e
wget -q -O libcsp.tar.gz \
https://github.com/shiyanhui/libcsp/releases/download/v0.0.2/libcsp-0.0.2.tar.gz
tar -xzvf libcsp.tar.gz
cd libcsp-0.0.2
./configure
make
make install
EOF
COPY main.c .
RUN bash <<EOF
set -e
cspcli init --working-dir=.
$CC $CFLAGS -c main.c -o main.o \
-fplugin=libcsp -fplugin-arg-libcsp-working-dir=.
cspcli analyze --working-dir=.
$CC $CFLAGS -o app *.o *.c \
-pthread -lcsp
EOF
ENTRYPOINT ["app"]
from libcsp.
Related Issues (15)
- nice job HOT 8
- Problem compiling HOT 2
- Future in V HOT 1
- how to build with cmake? HOT 1
- Website is down HOT 2
- Go's select statement: can a co-routine wait for multiple events at the same time, and process them in order they arrive HOT 1
- block call failed.
- function name and macro was conflict HOT 4
- CPU Pinning HOT 3
- Is this a bug? HOT 2
- Is there any designer documentation? HOT 1
- Unable to install libcsp HOT 1
- libcsp build failure HOT 1
- Is this library cross platform? HOT 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 libcsp.