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 issues when enabling docs for LuaJIT (on Windows) - LDoc missing dependence #454

Open
eabase opened this issue Feb 23, 2025 · 0 comments

Comments

@eabase
Copy link

eabase commented Feb 23, 2025

I decided to try building with all the docs.

So checking the build we see that LuaJIT is asking to use the LDoc (among several others), not mentioned elsewhere here.

Looking in to the file ..\luajit\docs\CMakeLists.txt we find that there is some confusion for the Windows build, in addition to not informing user about this.

https://github.com/pothosware/SoapySDR/blob/master/luajit/docs/CMakeLists.txt#L27-L34

# TODO: is "." cross-platform?
set(LDOC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doc)
add_custom_command(
    OUTPUT ${LDOC_OUTPUT_DIR}
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../apps ${CMAKE_CURRENT_BINARY_DIR}/config.ld
    COMMAND ${LDOC_EXECUTABLE} .
    COMMENT "Generating LuaJIT documentation with LDoc")
add_custom_target(ldoc_docs ALL DEPENDS ${LDOC_OUTPUT_DIR})

Thus is seem that these documents are can not be built correctly.


Looking into trying to get LDoc installed seem like royal PITA! Several obscure and badly documented dependencies.
You need to:

#--------------------------------------------
# Install LuaUnit  - a LuaJIT dependency 
#--------------------------------------------
# git clone [email protected]:bluebird75/luaunit.git
git clone --depth 1 https://github.com/bluebird75/luaunit
cd luaunit 

# Then copy the file "luaunit.lua" into your project or the `./lua/` "libs" directory.
# https://github.com/bluebird75/luaunit/issues/165
cp .\luaunit.lua C:\xxx\LuaJIT\lua\.

#--------------------------------------------
# Install LDoc  - a LuaJIT dependency 
#--------------------------------------------
# But depends on:
	https://github.com/luarocks/luarocks/
	https://github.com/lunarmodules/Penlight
	https://github.com/lunarmodules/luafilesystem

# (a) Install The lua "package manager" ?
https://github.com/luarocks/luarocks/
git clone https://github.com/luarocks/luarocks/

# (b) Install luafilesystem
luarocks install luafilesystem

# (c) Install penlight
luarocks install penlight
# copy "lua/pl" directory into your Lua module path. 
# It's typically "C:\Program Files\Lua\5.x\lua" for Lua for Windows.

# (d) Install LDoc
https://github.com/lunarmodules/ldoc
#luarocks install --tree c:/lua ldoc
luarocks install ldoc

PS. I haven't had time to jump through all these steps yet, but all this need to be documented here somewhere.

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

1 participant