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 fails on OpenBSD 7.6 #337

Open
Strahinja opened this issue Nov 3, 2024 · 6 comments
Open

Build fails on OpenBSD 7.6 #337

Strahinja opened this issue Nov 3, 2024 · 6 comments

Comments

@Strahinja
Copy link
Contributor

Trying to build latest master branch of ELinks:

$ git describe
elinks-0.12pre5-3939-g1655143d0

using OpenBSD 7.6-release fails. I have attached the configured options here: configure-build.txt.

I am getting the following output:

$ meson compile -C build
[...]
ld: warning: l10nflist.c:206 (../src/intl/gettext/l10nflist.c:206)(src/elinks.p/intl_gettext_l10nflist.c.o:(_nl_make_l10nflist)): warning: stpcpy() is dangerous; do not use it
ld: error: undefined symbol: backtrace
>>> referenced by error.c:287 (../src/util/error.c:287)
>>>               src/elinks.p/util_error.c.o:(dump_backtrace)

ld: error: undefined symbol: backtrace_symbols_fd
>>> referenced by error.c:291 (../src/util/error.c:291)
>>>               src/elinks.p/util_error.c.o:(dump_backtrace)

ld: error: undefined symbol: backtrace_symbols
>>> referenced by error.c:296 (../src/util/error.c:296)
>>>               src/elinks.p/util_error.c.o:(dump_backtrace)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[3/5] Generating doc/manual.html with a custom command
ninja: build stopped: subcommand failed.

I have found what seems to be a similar issue here, for building libmprompt under FreeBSD. Not sure if it is the same issue, but there it was solved by adding libexecinfo to the list of libraries to be linked with.

@rkd77
Copy link
Owner

rkd77 commented Nov 3, 2024

Does it build, if:
export LDFLAGS=-lexecinfo
before meson invocation?

@Strahinja
Copy link
Contributor Author

Strahinja commented Nov 3, 2024

I just tested that adding

deps += declare_dependency(link_args: ['-lexecinfo'])

to meson.build works.

Edit: The above method, export-ing LDFLAGS, doesn't seem to work.

@rkd77
Copy link
Owner

rkd77 commented Nov 3, 2024

Another question. Has libexinfo .pc (pkgconfig) file?

@Strahinja
Copy link
Contributor Author

Strahinja commented Nov 3, 2024

No, libexecinfo doesn't include the pkgconfig .pc file. There's the source code of the library, and also:

$ su
# find /usr -name '*execinfo*'
/usr/local/share/aclocal/ax_execinfo.m4
/usr/lib/libexecinfo.so.3.0
/usr/lib/libexecinfo.a
/usr/lib/libexecinfo_p.a
/usr/include/execinfo.h
/usr/ports/lang/gcc/11/patches/patch-libphobos_libdruntime_core_sys_openbsd_execinfo_d

Edit: There's also libbacktrace in ports, but it also doesn't have the .pc file.

Edit 2: That libbacktrace seems pretty old, and the current ports tree doesn't have it. I found it linked on (probably outdated) ports.su page.

rkd77 added a commit that referenced this issue Nov 3, 2024
rkd77 added a commit that referenced this issue Nov 3, 2024
@rkd77
Copy link
Owner

rkd77 commented Nov 3, 2024

Try these ^ two commits.

@Strahinja
Copy link
Contributor Author

Strahinja commented Nov 4, 2024

I can confirm that compiling from

$ git describe
elinks-0.12pre5-3942-g302470b82

works without errors (only some warnings unrelated to this issue). If that is the final fix, feel free to close this issue.

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