ERROR: Service 'kleinanzeigen' failed to build : Build failed
Closed this issue · 2 comments
Hello,
since a few days i am trying to set up this Bot on my VPS but unfortunately i dont get it running. It runs just fine on my Raspberry Pi but not on my VPS.
I have tried Ubuntu 20.04 and Ubuntu 22.04 but on both of it it doesnt work and starting process just stops at "Step 6/7 : RUN go install github.com/danielstefank/kleinanzeigen-alert/". I also reinstalled the systems many times but it didn't help.
I hope there is a solution for this and Kleinanzeigen doesn't block my IP. I know for sure that this bot works and is programmed very well. I just couldn't get smarter from the information in the error.
I think that there are missing libraries or something like that, which i didn't find yet.
This is the error i get:
root@v68109:~/alert# docker-compose up
Building kleinanzeigen
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 172kB
Step 1/7 : FROM golang:alpine
---> a2742f74d90f
Step 2/7 : RUN apk update && apk add --no-cache git gcc musl-dev
---> Using cache
---> ad7523d01c0d
Step 3/7 : ADD . /go/src/github.com/danielstefank/kleinanzeigen-alert/
---> Using cache
---> b402742f455c
Step 4/7 : WORKDIR /go/src/github.com/danielstefank/kleinanzeigen-alert/
---> Using cache
---> 2066d76d9952
Step 5/7 : RUN go get -d -v
---> Using cache
---> b5fb38f3f45f
Step 6/7 : RUN go install github.com/danielstefank/kleinanzeigen-alert/
---> Running in 09bc65198725
# github.com/mattn/go-sqlite3
sqlite3-binding.c:33886:42: error: 'pread64' undeclared here (not in a function); did you mean 'pread'?
33886 | { "pread64", (sqlite3_syscall_ptr)pread64, 0 },
| ^~~~~~~
| pread
sqlite3-binding.c:33904:42: error: 'pwrite64' undeclared here (not in a function); did you mean 'pwrite'?
33904 | { "pwrite64", (sqlite3_syscall_ptr)pwrite64, 0 },
| ^~~~~~~~
| pwrite
sqlite3-binding.c: In function 'seekAndRead':
sqlite3-binding.c:33890:49: error: unknown type name 'off64_t'; did you mean 'off_t'?
33890 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
| ^~~~~~~
sqlite3-binding.c:36748:11: note: in expansion of macro 'osPread64'
36748 | got = osPread64(id->h, pBuf, cnt, offset);
| ^~~~~~~~~
sqlite3-binding.c:33890:58: error: expected ')' before 'aSyscall'
33890 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
| ~ ^~~~~~~~
sqlite3-binding.c:36748:11: note: in expansion of macro 'osPread64'
36748 | got = osPread64(id->h, pBuf, cnt, offset);
| ^~~~~~~~~
sqlite3-binding.c: In function 'seekAndWriteFd':
sqlite3-binding.c:33908:57: error: unknown type name 'off64_t'; did you mean 'off_t'?
33908 | #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
| ^~~~~~~
sqlite3-binding.c:36860:17: note: in expansion of macro 'osPwrite64'
36860 | do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
| ^~~~~~~~~~
sqlite3-binding.c:33909:21: error: expected ')' before 'aSyscall'
33909 | aSyscall[13].pCurrent)
| ^~~~~~~~
sqlite3-binding.c:36860:17: note: in expansion of macro 'osPwrite64'
36860 | do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
| ^~~~~~~~~~
sqlite3-binding.c:33908:21: note: to match this '('
33908 | #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
| ^
sqlite3-binding.c:36860:17: note: in expansion of macro 'osPwrite64'
36860 | do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
| ^~~~~~~~~~
The command '/bin/sh -c go install github.com/danielstefank/kleinanzeigen-alert/' returned a non-zero code: 1
ERROR: Service 'kleinanzeigen' failed to build : Build failed
Relates to go-gorm/sqlite#177
Your pi probably had an old version of golang:alpine cached, where the build runs through fine and the VPS Loaded the newest.
I have added a specific working version of golang:alpine to the Dockerfile.
@Kamran12646 you can update the repo on your VPS and run docker-compose up
again.