aldorlang / aldor

The Aldor Programming Language
http://pippijn.github.io/aldor/
33 stars 11 forks source link

-Werror breaks the build process #158

Open gvanuxem opened 1 year ago

gvanuxem commented 1 year ago

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 commented 1 year ago

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.

pbroadbery commented 1 year ago

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 commented 1 year ago

gcc (Debian 12.2.0-14) 12.2.0 Kali Linux on WSL2.

Le ven. 2 juin 2023, 11:15, pbroadbery @.***> a écrit :

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)

— Reply to this email directly, view it on GitHub https://github.com/aldorlang/aldor/issues/158#issuecomment-1573416561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGLAMCSI4C35XKUXH45HD3XJGVKFANCNFSM6AAAAAAYXPZ3KI . You are receiving this because you authored the thread.Message ID: @.***>

gvanuxem commented 5 days ago

Hello,

Just Git cloned Aldor and FriCAS and all seems fine for me. FriCAS with Aldor tests also pass.

Aldor is now even buildable on a Debian-like system with 'dpkg-buildpackage -b', many thanks for your work!

Le dim. 24 nov. 2024 à 16:12, pbroadbery @.***> a écrit :

I think I've fixed it with the latest couple of commits - could you give it a test?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

pbroadbery commented 5 days ago

Hi,

Thanks for testing it - it's reassuring that it works in a couple of environments. I've a few more changes in the pipeline and hoping to get them released soon.

Peter

On Wed, 27 Nov 2024, 11:00 Grégory Vanuxem, @.***> wrote:

Hello,

Just Git cloned Aldor and FriCAS and all seems fine for me. FriCAS with Aldor tests also pass.

Aldor is now even buildable on a Debian-like system with 'dpkg-buildpackage -b', many thanks for your work!

  • Greg

Le dim. 24 nov. 2024 à 16:12, pbroadbery @.***> a écrit :

I think I've fixed it with the latest couple of commits - could you give it a test?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/aldorlang/aldor/issues/158#issuecomment-2503571539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABWHLMF7LV4XZY6YLKHZ2D2CWQ3NAVCNFSM6AAAAABSMKK5JGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBTGU3TCNJTHE . You are receiving this because you commented.Message ID: @.***>