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

build failure on Linux #36

Closed
tulsidas opened this issue May 10, 2023 · 9 comments
Closed

build failure on Linux #36

tulsidas opened this issue May 10, 2023 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@tulsidas
Copy link

tulsidas commented May 10, 2023

Describe the bug
Following the steps on INSTALL wiki, the make step fails to build the project

To Reproduce
Steps to reproduce the behavior:

  1. Clone project
  2. run ./bootstrap.sh
  3. run make

Error:

In file included from attribctx_lexer.c:49:
../gl/string.h:965:1: error: expected ‘,’ or ‘;’ before ‘_GL_ATTRIBUTE_MALLOC’
  965 | _GL_FUNCDECL_SYS (strdup, char *,
      | ^~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1655: libp11_la-attribctx_lexer.lo] Error 1

Attaching config.log

Operating System (please complete the following information):

  • OS: Linux desktop 6.1.0-8-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.25-1 (2023-04-22) x86_64 GNU/Linux
@keldonin
Copy link
Contributor

Hi @tulsidas, I also encountered this issue on FreeBSD, when using recent versions of GCC. It seems to be caused by:

  • flex that generates C code from lexer files, where the order of includes has string.h being included before stdlib.h
  • gnulib that creates replacement header files, that implies this ordering
  • probably some other compiler-related cause that I haven't identified yet.

I could make it work by using clang as the compiler on my platform. Can you give it a try?

# I haven't checked, I would expect the package name to be clang, please verify how it's labelled
sudo apt-get install clang

./bootstrap.sh
./configure CC=clang
make

@keldonin keldonin self-assigned this May 12, 2023
@keldonin keldonin added the bug Something isn't working label May 12, 2023
@tulsidas
Copy link
Author

@keldonin that worked! thanks for the quick response 👍🏼

@keldonin
Copy link
Contributor

@tulsidas you welcome. There is nevertheless an underlying issue that we must address.

@tulsidas
Copy link
Author

feel free to contact me if you need to try out something on Linux

@keldonin
Copy link
Contributor

Out of curiosity, what is the linux distribution you run? Is it just plain Debian?

@tulsidas
Copy link
Author

Yes, Debian testing thou

$ cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

@keldonin
Copy link
Contributor

Hi @tulsidas, thanks for the information. I see this version will be released by June 10th. I'll give it a try - on a side note, the project compiles like a charm on the current Debian release (11).

@tulsidas
Copy link
Author

@keldonin FYI I just tried building today (a fresh clone) and it worked ok

@tulsidas tulsidas reopened this Jul 18, 2023
@keldonin
Copy link
Contributor

@keldonin FYI I just tried building today (a fresh clone) and it worked ok

As of release 2.6.0 I intend to ship binaries. There are already RPMs available, Debian packages to come later. You could try to deploy the RPM using alien on Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants