Cannot compile concord v2.4.0 on voidlinux
Describe the bug
Concord 2.4.0 cannot be compiled on voidlinux.
Expected behavior
The compilation should succeed.
Screenshots
~ cd /tmp
tmp curl -fLO https://github.com/Cogmasters/concord/archive/refs/tags/v2.4.0.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 777498 0 777498 0 0 27319 0 --:--:-- 0:00:28 --:--:-- 6349
tmp tar xvf v2.4.0.tar.gz >/dev/null
tmp cd concord-2.4.0/
concord-2.4.0 make CFLAGS="-I $PWD/core" shared
make[1]: Entering directory '/tmp/concord-2.4.0/core'
gcc -I /tmp/concord-2.4.0/core -c -o cog-utils.o cog-utils.c
gcc -I /tmp/concord-2.4.0/core -c -o io_poller.o io_poller.c
gcc -I /tmp/concord-2.4.0/core -c -o user-agent.o user-agent.c
gcc -I /tmp/concord-2.4.0/core -c -o websockets.o websockets.c
gcc -I /tmp/concord-2.4.0/core -c -o curl-websocket.o curl-websocket.c
gcc -I /tmp/concord-2.4.0/core -c -o jsmn-find.o jsmn-find.c
gcc -I /tmp/concord-2.4.0/core -c -o json-build.o json-build.c
gcc -I /tmp/concord-2.4.0/core -c -o log.o log.c
gcc -I /tmp/concord-2.4.0/core -c -o logconf.o logconf.c
gcc -I /tmp/concord-2.4.0/core -c -o priority_queue.o priority_queue.c
gcc -I /tmp/concord-2.4.0/core -c -o anomap.o anomap.c
gcc -I /tmp/concord-2.4.0/core -c -o sha1.o sha1.c
gcc -I /tmp/concord-2.4.0/core -c -o threadpool.o threadpool.c
gcc -I /tmp/concord-2.4.0/core -c -o queriec.o queriec.c
io_poller.c: In function 'io_poller_perform':
io_poller.c:146:21: warning: 'curl_multi_socket_all' is deprecated: since 7.19.5. Use curl_multi_socket_action() [-Wdeprecated-declarations]
146 | : curl_multi_socket_all(curlm->multi, &curlm->running);
| ^
In file included from /usr/include/curl/curl.h:3321,
from io_poller.h:5,
from io_poller.c:13:
/usr/include/curl/multi.h:326:1: note: declared here
326 | curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
| ^~~~~~~~~~~~~~~~~~~~~
websockets.c: In function 'ws_multi_socket_run':
websockets.c:837:5: warning: 'curl_multi_socket_all' is deprecated: since 7.19.5. Use curl_multi_socket_action() [-Wdeprecated-declarations]
837 | mcode = curl_multi_socket_all(ws->mhandle, &is_running);
| ^~~~~
In file included from /usr/include/curl/curl.h:3321,
from curl-websocket.h:29,
from websockets.c:6:
/usr/include/curl/multi.h:326:1: note: declared here
326 | curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
| ^~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/tmp/concord-2.4.0/core'
make[1]: Entering directory '/tmp/concord-2.4.0/gencodecs'
cc -I /tmp/concord-2.4.0/core gencodecs-pp.c -o gencodecs-pp
Generating forward definitions
Generating header
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_FORWARD -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.c
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_HEADER -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.h
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
Generating source
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.c
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_HEADER -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.h
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
cc -c -I /tmp/concord-2.4.0/core discord_codecs.c -o discord_codecs.o
In file included from discord_codecs.c:1:
discord_codecs.h:8:19: warning: extra tokens at end of #include directive
8 | #include "types.h"#include <stddef.h>
| ^
discord_codecs.h:19:19: warning: extra tokens at end of #include directive
19 | #include "types.h"#endif /* DISCORD_CODECS_H */
| ^
discord_codecs.h:1: error: unterminated #ifndef
1 | #ifndef DISCORD_CODECS_H
discord_codecs.c:13:2: error: stray '#' in program
13 | }#include <stdio.h>
| ^
discord_codecs.c:13:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
13 | }#include <stdio.h>
| ^
make[1]: *** [Makefile:70: discord_codecs.o] Error 1
make[1]: Leaving directory '/tmp/concord-2.4.0/gencodecs'
make: *** [Makefile:31: shared] Error 2
To Reproduce
(On voidlinux):
$ curl -fLO https://github.com/Cogmasters/concord/archive/refs/tags/v2.4.0.tar.gz
$ tar xvf v2.4.0.tar.gz
$ cd concord-2.4.0/
$ make CFLAGS="-I $PWD/core" shared # the -I is required otherwise concord doesn't find the core headers
Version
Concord v2.4.0.
Stack trace
None.
Additional context
env:
CXXFLAGS=-O3 -pipe -march=native
LDFLAGS=-O3 -pipe -march=native
MAKEFLAGS=-j24
CFLAGS=-O3 -pipe -march=native
FCFLAGS=-O3 -pipe -march=native
CXX=g++
FFLAGS=-O3 -pipe -march=native
CC=gcc
If you do a make before a make shared, what happens?
If you do a
makebefore amake shared, what happens?
tmp tar xvf v2.4.0.tar.gz >/dev/null
tmp cd concord-2.4.0/
concord-2.4.0 make CFLAGS="-I $PWD/core"
make[1]: Entering directory '/tmp/concord-2.4.0/core'
gcc -I /tmp/concord-2.4.0/core -c -o cog-utils.o cog-utils.c
gcc -I /tmp/concord-2.4.0/core -c -o io_poller.o io_poller.c
gcc -I /tmp/concord-2.4.0/core -c -o user-agent.o user-agent.c
gcc -I /tmp/concord-2.4.0/core -c -o websockets.o websockets.c
gcc -I /tmp/concord-2.4.0/core -c -o curl-websocket.o curl-websocket.c
gcc -I /tmp/concord-2.4.0/core -c -o jsmn-find.o jsmn-find.c
gcc -I /tmp/concord-2.4.0/core -c -o json-build.o json-build.c
gcc -I /tmp/concord-2.4.0/core -c -o log.o log.c
gcc -I /tmp/concord-2.4.0/core -c -o logconf.o logconf.c
gcc -I /tmp/concord-2.4.0/core -c -o priority_queue.o priority_queue.c
gcc -I /tmp/concord-2.4.0/core -c -o anomap.o anomap.c
gcc -I /tmp/concord-2.4.0/core -c -o sha1.o sha1.c
gcc -I /tmp/concord-2.4.0/core -c -o threadpool.o threadpool.c
gcc -I /tmp/concord-2.4.0/core -c -o queriec.o queriec.c
io_poller.c: In function 'io_poller_perform':
io_poller.c:146:21: warning: 'curl_multi_socket_all' is deprecated: since 7.19.5. Use curl_multi_socket_action() [-Wdeprecated-declarations]
146 | : curl_multi_socket_all(curlm->multi, &curlm->running);
| ^
In file included from /usr/include/curl/curl.h:3321,
from io_poller.h:5,
from io_poller.c:13:
/usr/include/curl/multi.h:326:1: note: declared here
326 | curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
| ^~~~~~~~~~~~~~~~~~~~~
websockets.c: In function 'ws_multi_socket_run':
websockets.c:837:5: warning: 'curl_multi_socket_all' is deprecated: since 7.19.5. Use curl_multi_socket_action() [-Wdeprecated-declarations]
837 | mcode = curl_multi_socket_all(ws->mhandle, &is_running);
| ^~~~~
In file included from /usr/include/curl/curl.h:3321,
from curl-websocket.h:29,
from websockets.c:6:
/usr/include/curl/multi.h:326:1: note: declared here
326 | curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
| ^~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/tmp/concord-2.4.0/core'
make[1]: Entering directory '/tmp/concord-2.4.0/gencodecs'
cc -I /tmp/concord-2.4.0/core gencodecs-pp.c -o gencodecs-pp
Generating forward definitions
Generating header
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_FORWARD -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.c
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_HEADER -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.h
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_HEADER -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.h
Generating source
cc -E -I /tmp/concord-2.4.0/core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.c
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
cc -c -I /tmp/concord-2.4.0/core discord_codecs.c -o discord_codecs.o
In file included from discord_codecs.c:1:
discord_codecs.h:8:19: warning: extra tokens at end of #include directive
8 | #include "types.h"#include <stddef.h>
| ^
discord_codecs.h:19:19: warning: extra tokens at end of #include directive
19 | #include "types.h"#endif /* DISCORD_CODECS_H */
| ^
discord_codecs.h:1: error: unterminated #ifndef
1 | #ifndef DISCORD_CODECS_H
discord_codecs.c:13:2: error: stray '#' in program
13 | }#include <stdio.h>
| ^
discord_codecs.c:13:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
13 | }#include <stdio.h>
| ^
make[1]: *** [Makefile:70: discord_codecs.o] Error 1
make[1]: Leaving directory '/tmp/concord-2.4.0/gencodecs'
make: *** [Makefile:27: static] Error 2
Same error
Do a make clean, enter the gencodecs directory, invoke make, go up a dir, and re-invoke make; let me know how that works out
Do a make clean, enter the gencodecs directory, invoke make, go up a dir, and re-invoke make; let me know how that works out
tmp tar xvf v2.4.0.tar.gz >/dev/null
tmp cd concord-2.4.0/
concord-2.4.0 make clean
make[1]: Entering directory '/tmp/concord-2.4.0/src'
make[2]: Entering directory '/tmp/concord-2.4.0/core'
make[2]: Leaving directory '/tmp/concord-2.4.0/core'
make[1]: Leaving directory '/tmp/concord-2.4.0/src'
make[1]: Entering directory '/tmp/concord-2.4.0/test'
make[1]: Leaving directory '/tmp/concord-2.4.0/test'
make[1]: Entering directory '/tmp/concord-2.4.0/examples'
make[1]: Leaving directory '/tmp/concord-2.4.0/examples'
make[1]: Entering directory '/tmp/concord-2.4.0/gencodecs'
make[1]: Leaving directory '/tmp/concord-2.4.0/gencodecs'
concord-2.4.0 cd gencodecs/
gencodecs make CFLAGS="-I $PWD/../core"
cc -I /tmp/concord-2.4.0/gencodecs/../core gencodecs-pp.c -o gencodecs-pp
Generating forward definitions
Generating header
cc -E -I /tmp/concord-2.4.0/gencodecs/../core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_FORWARD -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.c
cc -E -I /tmp/concord-2.4.0/gencodecs/../core -DGENCODECS_HEADER -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.h
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
Generating source
cc -E -I /tmp/concord-2.4.0/gencodecs/../core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_DATA -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.c
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
cc -E -I /tmp/concord-2.4.0/gencodecs/../core -DGENCODECS_INIT -DGENCODECS_JSON_ENCODER -DGENCODECS_JSON_DECODER -DGENCODECS_HEADER -nostdinc -P discord_codecs.PRE.h | ./gencodecs-pp >> discord_codecs.h
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
discord_codecs.PRE.h:70:27: fatal error: all.PRE.h: No such file or directory
70 | # define GENCODECS_READ "all.PRE.h"
| ^~~~~~~~~~~
compilation terminated.
cc -c -I /tmp/concord-2.4.0/gencodecs/../core discord_codecs.c -o discord_codecs.o
In file included from discord_codecs.c:1:
discord_codecs.h:8:19: warning: extra tokens at end of #include directive
8 | #include "types.h"#include <stddef.h>
| ^
discord_codecs.h:19:19: warning: extra tokens at end of #include directive
19 | #include "types.h"#endif /* DISCORD_CODECS_H */
| ^
discord_codecs.h:1: error: unterminated #ifndef
1 | #ifndef DISCORD_CODECS_H
discord_codecs.c:13:2: error: stray '#' in program
13 | }#include <stdio.h>
| ^
discord_codecs.c:13:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
13 | }#include <stdio.h>
| ^
make: *** [Makefile:70: discord_codecs.o] Error 1
gencodecs 2
Same error, and looking at the discord_codecs.c file it seems that newlines are missing:
I think I've completely lost the plot here...
- What is Void Linux doing that every other Linux image I've tried seemingly does not do (with regards to breaking Concord)?
- Gencodecs isn't finishing at all, is it missing files and/or getting bogus input piped in?
- all.PRE.h is shipped with the Concord dist files, if it doesn't exist something majorly wrong has happened and/or you have deleted dist files (or, possibly even stranger, the filenames have been squashed to lowercase for some reason)
I think I've completely lost the plot here...
- What is Void Linux doing that every other Linux image I've tried seemingly does not do (with regards to breaking Concord)?
- Gencodecs isn't finishing at all, is it missing files and/or getting bogus input piped in?
- all.PRE.h is shipped with the Concord dist files, if it doesn't exist something majorly wrong has happened and/or you have deleted dist files (or, possibly even stranger, the filenames have been squashed to lowercase for some reason)
1 That's what I'm trying to figure out. 2-3 I did not touched anything in the archive
This has got me completely stumped. I'll spin up a VM to figure it out in a few hours... I am dying of curiosity to figure out what's going on here
@WladimirBec I've personally just tested compiling concord from inside a Void Linux container on a Debian host and it worked for me (specifically 6.12.57+deb13-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64 GNU/Linux). Could you possibly try git cloning the repository and building it that way?
My exact commands that succeeded for me:
xbps-install -Syu gcc git make libcurl libcurl-devel
git clone https://github.com/Cogmasters/concord
cd concord
make
@WladimirBec I've personally just tested compiling concord from inside a Void Linux container on a Debian host and it worked for me (specifically
6.12.57+deb13-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64 GNU/Linux). Could you possibly try git cloning the repository and building it that way?My exact commands that succeeded for me:
xbps-install -Syu gcc git make libcurl libcurl-devel git clone https://github.com/Cogmasters/concord cd concord make
I've tried to follow your exact steps and I confirm it compiles successfully, my goal is to package concord for void-linux, so I've tried to manually download the zip archive of the 2.4.0 commit and it works as well:
curl -fLO https://github.com/Cogmasters/concord/archive/fb0f834d07d65048a6afde177e318fe9659a9494.zip
unzip fb0f834d07d65048a6afde177e318fe9659a9494.zip
cd concord-fb0f834d07d65048a6afde177e318fe9659a9494
make
So the problem resided in the 2.4.0 asset https://github.com/Cogmasters/concord/archive/refs/tags/v2.4.0.tar.gz for some reason.
Thanks for the help !
I'll have to look at that release tarball, something's majorly wrong with it. Please do submit a package, we love packages in various package repos!!