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

AUR Arch build fails to compile #79

Open
celtichawk opened this issue Apr 13, 2022 · 9 comments
Open

AUR Arch build fails to compile #79

celtichawk opened this issue Apr 13, 2022 · 9 comments

Comments

@celtichawk
Copy link

I've just run into this, on the latest Arch Linux, Edbrowse fails to build from the AUR.

It requires quickjs and the unixodbc packages, which I I instaled, and now it wants jseng. Which is where it trips up.

Is there a static build or is the Aur pkgbuild out of date? The last comment from March this year shows it fails to build as well, though with a different issue that's corrected with the unixodbc package being installed

However the one I'm running into for Arch, is it can't find quickjs-libc.h despite there being a quickjs and quickjspp in the AUR however. So is this an Arch issue or a pkgbuild issue with it failing to compile?

@eklhad
Copy link
Collaborator

eklhad commented Apr 13, 2022 via email

@m040601
Copy link

m040601 commented Sep 3, 2022

First of all, thank you for the wonderfull and continuing work on this tool. It's amazing to see the amount of current and fresh information on github, the wiki and edbrowse.org. Nice for people who are interested but new to these concepts of line browsing etc. In contrast to veteran users, for whom "everything is obvious" and no need for "docs" or "wiki" pages.

We are writing specific build instructions in the edbrowse wiki, but I'm sorry we don't have one written for arch yet.
I'll add that to my list.

Any updates on this ?

I have exactly the same problem also on Archlinux,

cc -Wall -Wno-unused -D_FILE_OFFSET_BITS=64 -DEDBROWSE_ON_LINUX     -c -o dbops.o dbops.c
dbops.c: In function ‘timeString’:
dbops.c:573:41: warning: ‘%02d’ directive writing between 2 and 6 bytes into a region of size between 0 and 6 [-Wformat-overflow=]
  573 |                 sprintf(buf, "%02d:%02d:%02d %cM", h, m, s, c);
      |                                         ^~~~
dbops.c:573:30: note: directive argument in the range [-32768, 32767]
  573 |                 sprintf(buf, "%02d:%02d:%02d %cM", h, m, s, c);
      |                              ^~~~~~~~~~~~~~~~~~~~
dbops.c:573:17: note: ‘sprintf’ output between 12 and 22 bytes into a destination of size 12
  573 |                 sprintf(buf, "%02d:%02d:%02d %cM", h, m, s, c);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -Wall -Wno-unused -D_FILE_OFFSET_BITS=64 -DEDBROWSE_ON_LINUX     -c -o dbodbc.o dbodbc.c
dbodbc.c:25:10: fatal error: sql.h: No such file or directory
   25 | #include <sql.h>                /* ODBC header files */
      |          ^~~~~~~
compilation terminated.
make[1]: *** [<builtin>: dbodbc.o] Error 1
make[1]: Leaving directory '/dev/shm/edbrowse/src'
make: *** [makefile:5: all] Error 2

Thanks in advance.

@m040601
Copy link

m040601 commented Sep 3, 2022

For reference, here is the Archlinux PKGBUILD page, https://aur.archlinux.org/packages/edbrowse-git

@martinetd
Copy link
Contributor

That's much easier to answer with the error.
sql used to be optional but was changed to a required feature recently, you need to install unixodbc to build.

@martinetd
Copy link
Contributor

ah, and the first post says after installing unixodbc you need quickjs. That'll probably be true for you asell.
https://aur.archlinux.org/packages/quickjs might work but I'm not sure if edbrowse makefile will know where to find it, that might need adjustments.

@m040601
Copy link

m040601 commented Sep 3, 2022

Thanks for your orientation.

Forgot to say that after finding on https://edbrowse.org/

As of June 2014, we are now providing statically-linked edbrowse
executables for Linux. This should be useful for people who both
run a Linux distribution that does not package edbrowse and wish to
get up and running without the hassle of building from source.
See the static binaries page for more links.

Maybe that should be in the wiki as well ?

So anyway, I tried that one, https://edbrowse.org/static/, on Archlinux and it seems to run flawlessly.

That makes it possible to create a PKGBUILD for Archlinux "edbrowse-bin". Which will avoid adding more complicated dependencies only found on the AUR and not in Arch official packages.

... after installing ... you need ...
https://aur.archlinux.org/packages....

Actually that is my biggest "problem". The AUR in Archlinux is a gift from the gods. You can find and put everything needed there. But, I try to avoid more and more AUR dependecies on my system. Since they are user provided and not "officially" Archlinux reviewed.

In the end the best thing would be for Archlinux itself, to officially make a package for edbrowse. Hope we can get there, if we get enough votes on the edbrowse AUR PKGBUILD.

I wondered why arent these static build for Linux being released (and signed/verified/etc) on github ? Easier to find . And maybe better than from a private web page, even though they are being GPG signed ?

Github provides a nice free infrastructure to automating all this, the github actions/workflows.
I see this a lot for tiny little tools written in Go (or even C sometimes). You find on the release page of github a huge list with source and binaries for Linux/Bsd/windows/x86/arm/arm64. Even for the kitchen sink appliance.

I'm not a programmer. And I am well aware that Go is much easier to build and distribute than other languages.

I naively suspect that in the end it's always that javascript dependency that ruins the party. Be it jseng/quickjs/duktape .

Being very interested lately in all things minimalism, gemini, text browsing etc. I am a proficient cli user and browser of the modern web without javascript.

My first question is,

Is there anything like "edbrowser without javascript support" ?

Regarding github. I Always wandered why there is "nothing to download" in the github release page, https://github.com/CMB/edbrowse/releases. Only "tags".

So my second question is,

Is it something being considered ? Or somehow the current dependencies for edbrowse make this a very difficult task and a lot of work needed for edbrowse ?

@count-ellington
Copy link

count-ellington commented Oct 7, 2022

Thought I would comment here with since I also commented over in the AUR.

The fix with the AUR package is adding dependencies for quickjs and unixodbc as mentioned above.

additionally the make command needs to be run like this

make CFLAGS="-I/usr/include/tidy -I/usr/include/quickjs" QUICKJS_DIR=/usr/lib/quickjs all

Simply because the makefile assumes quickjs is relative to the source of edbrowse rather than assuming quickjs is in the system. Jseng (as op mentions) is where make first references what is found in /usr/include/quickjs namely, as op mentions, the quickjs-libc.h

Though I personally find it an odd choice to reference required files relative to source location. I don't know if this really counts as an issue with edbrowse but more with the aur package which seems to not be actively maintained.

EDIT:

I finally had a chance to fully test it and my solution didn't actually work. It would build but as soon as you actually tried to load a site it would segfault.

This is the correct solution. for the PKGBUILD to run

make QUICKJS_DIR="/usr/include/quickjs" QUICKJS_LDFLAGS=/usr/lib/quickjs/libquickjs.a -ldl

@eklhad
Copy link
Collaborator

eklhad commented Oct 7, 2022 via email

@count-ellington
Copy link

count-ellington commented Oct 7, 2022 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

5 participants