Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing --disable-static to ./configure breaks examples compilation #399

Open
abustany opened this issue May 16, 2023 · 1 comment
Open

Comments

@abustany
Copy link

From the current (1.9.0) release:

$ NOCONFIGURE=1 ./autogen.sh
$ ./configure --disable-static
$ make -j8
... lots of logs ...

../src/websocket.c:15:10: fatal error: websocket.h: No such file or directory
   15 | #include "websocket.h"
      |          ^~~~~~~~~~~~~

Removing --disable-static fixes the build.

@lf-
Copy link

lf- commented Oct 18, 2023

The reason for this is that the build products are reused from src in the case of NOT --disable-static and --disable-dep-track. From what I can tell, make winds up hitting an implicit rule to build the ../src/websocket.c because of ../src/websocket.o:

examples/Makefile.am:

ws_echo2_LDADD = \
    ../src/base64.o \
    ../src/char_buffer.o \
    ../src/hash_table.o \
    ../src/sha1.o \
    ../src/socket_manager.o \
    ../src/websocket.o

In the case of the Nix build, we are adding --disable-static and --disable-dep-track due to setup.sh defaults. Interestingly, enabling dep tracking plus disabled static outputs creates a different and interesting issue with a .Tpo file being reported as missing.

Somewhere in here is a misuse of autotools, but I don't know enough about autotools to identify what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants