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

-Werror breaks the build process #158

Open
gvanuxem opened this issue Jun 1, 2023 · 5 comments
Open

-Werror breaks the build process #158

gvanuxem opened this issue Jun 1, 2023 · 5 comments

Comments

@gvanuxem
Copy link
Contributor

gvanuxem commented Jun 1, 2023

Apparently, it is the first time I compile Aldor, by default -Werror is used as STRICTCFLAGS or something like that. I had to remove it from config.status to build Aldor since there are some warnings during Aldor compilation.

What I did:

git clone --depth=1 https://github.com/aldorlang/aldor.git
cd aldor/aldor
./autogen.sh
./configure
make

And the build process stops with:

../../../aldor/aldor/src/macex.c: In function 'pushMacDef':
../../../aldor/aldor/src/macex.c:184:32: error: the comparison will always evaluate as 'true' for the address of 'val' will never be NULL [-Werror=address]
  184 |         if (! symInfo(name) || ! symCoInfo(name))
      |                                ^
In file included from ../../../aldor/aldor/src/macex.c:30:
../../../aldor/aldor/src/symcoinfo.h:19:11: note: 'val' declared here
   19 |         } val;
      |           ^~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1729: macex.o] Error 1
make[4]: *** Waiting for unfinished jobs....

Regards

@gvanuxem
Copy link
Contributor Author

gvanuxem commented Jun 1, 2023

Modifying debian/rules to add --disable-error-on-warning after --enable-silent-rules (dh_auto_configure) solved the problem but a spurious file was missing with debuild -b. So,

cd aldor && ./autogen.sh && ./configure --disable-error-on-warning

does the trick.

@gvanuxem gvanuxem changed the title -Werror breaks the building process -Werror breaks the build process Jun 1, 2023
@pbroadbery
Copy link
Member

What compiler version are you using?
The error looks to be due to a new version doing more checks.

I want to keep the error on warn as a default - warnings do in general indicate issues, but we do ignore a subset.
The build instructions should mention disable-error-on-warning I guess.

Ignored warnings are listed in aldor/m4/strict_compile.m4.. Adding '-Wno-error=address' will work around your issue, but this one looks to be worth investigating.

Peter
(at work, so I can't look at this too deeply at the moment)

@gvanuxem
Copy link
Contributor Author

gvanuxem commented Jun 2, 2023 via email

@gvanuxem
Copy link
Contributor Author

gvanuxem commented Nov 27, 2024 via email

@pbroadbery
Copy link
Member

pbroadbery commented Nov 27, 2024 via email

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