rkd77 / elinks

Fork of elinks
Other
354 stars 38 forks source link

Won't build on arch linux #278

Open thenightterorx opened 11 months ago

thenightterorx commented 11 months ago

I've tried building on 2 different arch linux machines, and both end at form.cpp:330:9: note: in expansion of macro ‘add_to_list’ 330 | add_to_list(vs->forms, fv); | ^~~~~~~~~~~ In file included from ../../.././src/main/object.h:4, from ../../.././src/document/document.h:6, from vs.cpp:13: vs.cpp: In function ‘void copy_vs(view_state*, view_state*)’: ../../.././src/util/lists.h:187:20: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 187 | add_at_pos((list_typeof(x)) &(l), (list_typeof(x)) (x)) | ^ ../../.././src/util/lists.h:178:22: note: in definition of macro ‘add_at_pos’ 178 | (x)->next = (p)->next; \ | ^ vs.cpp:119:17: note: in expansion of macro ‘add_to_list’ 119 | add_to_list(dst->forms, newfv); | ^~~~~~~~~~~ ../../.././src/util/lists.h:187:20: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 187 | add_at_pos((list_typeof(x)) &(l), (list_typeof(x)) (x)) | ^ ../../.././src/util/lists.h:180:10: note: in definition of macro ‘add_at_pos’ 180 | (p)->next = (x); \ | ^ vs.cpp:119:17: note: in expansion of macro ‘add_to_list’ 119 | add_to_list(dst->forms, newfv); | ^~~~~~~~~~~ link.cpp: In function ‘void draw_current_link(session*, document_view*)’: link.cpp:313:57: warning: comparison between two arrays [-Warray-compare] 313 | && co->c.color != template_->c.color); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ link.cpp:313:57: note: use unary ‘+’ which decays operands to pointers or ‘&‘component_ref’ not supported by dump_decl<declaration error>[0] != &‘component_re’ not supported by dump_decl<declaration error>[0]’ to compare the addresses [LD] src/viewer/text/lib.o make[3]: Leaving directory '/home/lee/elinks/elinks-0.16.1.1/src/viewer/text' make[2]: Leaving directory '/home/lee/elinks/elinks-0.16.1.1/src/viewer' make[1]: Leaving directory '/home/lee/elinks/elinks-0.16.1.1/src' make: *** [Makefile.lib:284: all-recursive] Error 1

I have no idea what this error is, as there are lots of warnings but no other errors during build. Is this just due to me using arch linux?

rkd77 commented 11 months ago

ok, but did you try elinks-0.17.0rc2 or current GIT version?

thenightterorx commented 11 months ago

ok, but did you try elinks-0.17.0rc2 or current GIT version?

same result

rkd77 commented 11 months ago

Run make -j1 and cite error message, not warning, but error.

0-issue commented 11 months ago

I just tried recompiling on arch linux VM (kernel: 6.2.10-1-aarch64-ARCH), and latest elinks, and it works without any errors. The steps I followed are:

git clone https://github.com/rkd77/elinks.git
cd elinks
./autogen.sh
./configure
make
./src/elinks
thenightterorx commented 11 months ago

I'm very sorry for your time, the error was that I needed to have an older version of quickjs installed. I didn't think this was the issue at first since it also failed when I excluded the quickjs enablement, but I guess I forgot to reconfigure to test effectively.

I hadn't thought to run make -j25 | grep error

For anyone else, I did mkdir quickjs wget https://bellard.org/quickjs/quickjs-2020-11-08.tar.xz tar -xvf quickjs tar -xvf quickjs-2020-11-08.tar.xz cd quickjs-2020-11-08/ make -j25 #change for your computer sudo make install