xmake
xmake copied to clipboard
Autoconf install fails
Xmake Version
2.7.9
Operating System Version and Architecture
Darwin amrit-10.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64
ProductName: macOS
ProductVersion: 13.4
BuildVersion: 22F66
Describe Bug
When trying to build my package that I have created, an internal xmake error occurs
Expected Behavior
the package to build
Project Configuration
package("gnutls")
set_homepage("https://www.gnutls.org/")
set_description("GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols")
add_urls("https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/gnutls-$(version).tar.xz")
add_versions("3.7.10", "b6e4e8bac3a950a3a1b7bdb0904979d4ab420a81e74de8636dd50b467d36f5a9")
add_deps("autoconf", "automake", "libtool", "pkg-config")
add_configs("threads", { description = "Enable threads.", default = true, type = "boolean" })
add_configs("tools", { description = "Enable tools.", default = true, type = "boolean" })
add_configs("cxx", { description = "Enable C++ support.", default = false, type = "boolean" })
add_configs("dynamic-ncrypt", { description = "Enable dynamic nettle crypt.", default = false, type = "boolean" })
add_configs("hardware-acceleration", { description = "Enable hardware acceleration.", default = false, type = "boolean" })
add_configs("tls13-interop", { description = "Enable TLS1.3 interoperability testing with openssl.", default = false, type = "boolean" })
add_configs("padlock", { description = "Enable padlock acceleration.", default = true, type = "boolean" })
add_configs("strict-der-time", { description = "Allow non compliant DER time values.", default = true, type = "boolean" })
add_configs("sha1-support", { description = "Allow SHA1 as an acceptable hash for cert digital signatures.", default = false, type = "boolean" })
add_configs("ssl3-support", { description = "Enable support for the SSL 3.0 protocol.", default = false, type = "boolean" })
add_configs("ssl2-support", { description = "Enable support for the SSL 2.0 client hello.", default = true, type = "boolean" })
add_configs("dtls-srtp-support", { description = "Enable support for the DTLS-SRTP extension.", default = true, type = "boolean" })
add_configs("alpn-support", { description = "Enable support for the Application Layer Protocol Negotiation (ALPN) extension.", default = true, type = "boolean" })
add_configs("heartbeat-support", { description = "Enable support for the heartbeat extension.", default = true, type = "boolean" })
add_configs("srp-authentication", { description = "Enable the SRP authentication support.", default = true, type = "boolean" })
add_configs("psk-authentication", { description = "Enable the PSK authentication support.", default = true, type = "boolean" })
add_configs("anon-authentication", { description = "Enable the anonymous authentication support.", default = true, type = "boolean" })
add_configs("dhe", { description = "Enable the DHE support.", default = true, type = "boolean" })
add_configs("ecdhe", { description = "Enable the ECDHE support.", default = true, type = "boolean" })
add_configs("gost", { description = "Enable the GOST support.", default = true, type = "boolean" })
add_configs("cryptodev", { description = "Enable cryptodev support.", default = false, type = "boolean" })
add_configs("afalg", { description = "Enable AF_ALG support.", default = false, type = "boolean" })
add_configs("ktls", { description = "Enable KTLS support.", default = false, type = "boolean" })
add_configs("ocsp", { description = "Enable OCSP support.", default = true, type = "boolean" })
add_configs("openssl-compatibility", { description = "Enable the OpenSSL compatibility library.", default = true, type = "boolean" })
add_configs("fuzzer-target", { description = "Make a library intended for testing - not production.", default = false, type = "boolean" })
add_configs("nls", { description = "Use Native Language Support.", default = true, type = "boolean" })
add_configs("rpath", { description = "Hardcode runtime library paths.", default = true, type = "boolean" })
add_configs("fips140-mode", { description = "Enable FIPS140-2 mode.", default = false, type = "boolean" })
add_configs("strict-x509", { description = "Enable stricter sanity checks for x509 certificates.", default = false, type = "boolean" })
add_configs("non-suiteb-curves", { description = "Enable curves not in SuiteB.", default = true, type = "boolean" })
add_configs("libdane", { description = "Build libdane.", default = true, type = "boolean" })
on_install("linux", "macosx", function (package)
local configs = {}
table.insert(configs, "--disable-valgrind-tests")
table.insert(configs, "--enable-tests")
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
for name, enabled in pairs(package:configs()) do
if not package:extraconf("configs", name, "builtin") then
name = name:gsub("_", "-")
if enabled then
table.insert(configs, "--enable-" .. name)
else
table.insert(configs, "--disable-" .. name)
end
end
end
import("package.tools.autoconf").install(package, configs)
end)
package_end()
https://github.com/Frityet/Thor/blob/master/packages.lua
Additional Information and Error Logs
error: @programdir/modules/package/tools/autoconf.lua:354: bad argument #1 to 'directory' (string expected, got table)
stack traceback:
[C]: in function 'directory'
[@programdir/modules/package/tools/autoconf.lua:354]: in function 'buildenvs'
[@programdir/modules/package/tools/autoconf.lua:433]: in function 'configure'
[@programdir/modules/package/tools/autoconf.lua:473]: in function 'build'
[@programdir/modules/package/tools/autoconf.lua:502]: in function 'install'
[./packages.lua:63]: in function 'script'
[...dir/modules/private/action/require/impl/utils/filter.lua:125]: in function 'call'
[.../modules/private/action/require/impl/actions/install.lua:364]:
=> install gnutls 3.7.10 .. failed
error: @programdir/modules/private/async/runjobs.lua:256: .../modules/private/action/require/impl/actions/install.lua:469: install failed!
stack traceback:
[C]: in function 'error'
[@programdir/core/base/os.lua:921]:
[.../modules/private/action/require/impl/actions/install.lua:469]: in function 'catch'
[@programdir/core/sandbox/modules/try.lua:123]: in function 'try'
[.../modules/private/action/require/impl/actions/install.lua:328]:
[...modules/private/action/require/impl/install_packages.lua:479]: in function 'jobfunc'
[@programdir/modules/private/async/runjobs.lua:232]:
stack traceback:
[C]: in function 'error'
@programdir/core/base/os.lua:921: in function 'base/os.raiselevel'
(...tail calls...)
@programdir/modules/private/async/runjobs.lua:256: in field 'catch'
@programdir/core/sandbox/modules/try.lua:123: in global 'try'
@programdir/modules/private/async/runjobs.lua:218: in upvalue 'cotask'
@programdir/core/base/scheduler.lua:404: in function <@programdir/core/base/scheduler.lua:397>