Bug 242799 - editors/neovim: Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit: lib/libluv.so: undefined reference to `lua_tointegerx'
Summary: editors/neovim: Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit: lib...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-22 10:48 UTC by canardo
Modified: 2019-12-24 19:14 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (adamw)


Attachments
editors/neovim partial build log (15.10 KB, text/plain)
2019-12-22 10:49 UTC, canardo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description canardo 2019-12-22 10:48:43 UTC
Problem found when building editors/neovim on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit, running on Apple Powerbook 17".


# cd /usr/ports/editors/neovim 
# make -DBATCH install clean
.....
.....
/usr/local/lib/libluv.so: undefined reference to `lua_tointegerx'
/usr/local/lib/libluv.so: undefined reference to `lua_absindex'
/usr/local/lib/libluv.so: undefined reference to `lua_callk'
/usr/local/lib/libluv.so: undefined reference to `lua_pcallk'
/usr/local/lib/libluv.so: undefined reference to `lua_tonumberx'
/usr/local/lib/libluv.so: undefined reference to `luaL_setfuncs'
/usr/local/lib/libluv.so: undefined reference to `lua_getglobal'
/usr/local/lib/libluv.so: undefined reference to `lua_rawlen'
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/neovim


(partial build log attached)
Comment 1 canardo 2019-12-22 10:49:28 UTC
Created attachment 210134 [details]
editors/neovim partial build log
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2019-12-22 18:02:46 UTC
The actual build command for the link step in your log is identical to the build command in mine (on amd64).

Does it build successfully if you turn the LUAJIT option off? I have a suspicion that it will.

If not, then your best next step is to install poudriere on your system and see whether it builds successfully there (if so, then it points to environment contamination).
Comment 3 canardo 2019-12-22 21:00:54 UTC
(In reply to Adam Weinberger from comment #2)

I'm no developer, so I'm not sure what I did was right.
In Makefile, I've added line

OPTIONS_EXCLUDE_powerpc=LUAJIT

Then
# make clean
# make install clean
.....
===>  Installing for neovim-0.4.3
===>  Checking if neovim is already installed
===>   Registering installation for neovim-0.4.3
Installing neovim-0.4.3...
===>  Cleaning for neovim-0.4.3

So no build error anymore.
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2019-12-23 01:10:46 UTC
Thanks for the update. I'll blacklist luajit on ppc.
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-12-23 01:15:38 UTC
A commit references this bug:

Author: adamw
Date: Mon Dec 23 01:15:23 UTC 2019
New revision: 520674
URL: https://svnweb.freebsd.org/changeset/ports/520674

Log:
  neovim: Blacklist luajit on ppc

  It's possible that luajit itself is broken on ppc32, but neither of the
  people using that arch have reported similar errors AFAIK.

  PR:		242799

Changes:
  head/editors/neovim/Makefile
Comment 6 Justin Hibbits freebsd_committer freebsd_triage 2019-12-24 15:54:48 UTC
Excluding these architectures is the wrong thing to do.  The bug is not in neovim.  I discovered yesterday the bug actually lies in devel/luv.  It defaults to LUAJIT for amd64 and i386, and not for any other architecture.  This causes neovim to fail to build on all non-x86 architectures, because of this default.  The *only* exclusion that should exist is for powerpc64, where luajit does not work.  For all others, devel/luv's Makefile needs fixed.
Comment 7 Adam Weinberger freebsd_committer freebsd_triage 2019-12-24 19:14:29 UTC
Justin -

What you say sounds completely correct.

My difficulty is that I don't have a way to test these architectures. Any help you can give in getting neovim/luv/lua* to DTRT is much appreciated.