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

Failed to install on OpenBSD #2948

Closed
ChihHao-Su opened this issue Oct 20, 2022 · 9 comments
Closed

Failed to install on OpenBSD #2948

ChihHao-Su opened this issue Oct 20, 2022 · 9 comments
Labels
Milestone

Comments

@ChihHao-Su
Copy link

Xmake Version

2.7.2

Operating System Version and Architecture

OpenBSD 7.2 amd64

Describe Bug

I tried installing xmake on OpenBSD, following the manual: https://xmake.io/#/guide/installation, I got:

☁  boost_stacktrace_test  bash <(wget https://xmake.io/shget.text -O -)

正重新導向輸出至「「wget-log」」。
grep: unknown option -- Pgrep:
unknown option -- Pusage: grep [-abcEFGHhIiLlnoqRsUVvwxZ] [-A num] [-B num] [-C[num]] [-e pattern]
        [-f file] [-m num] [--binary-files=value] [--context[=num]]
        [--label=name] [--line-buffered] [--null] [pattern] [file ...]

usage: grep [-abcEFGHhIiLlnoqRsUVvwxZ] [-A num] [-B num] [-C[num]] [-e pattern]
        [-f file] [-m num] [--binary-files=value] [--context[=num]]
        [--label=name] [--line-buffered] [--null] [pattern] [file ...]
grep: grep: unknown option -- Punknown option -- P

usage: grep [-abcEFGHhIiLlnoqRsUVvwxZ] [-A num] [-B num] [-C[num]] [-e pattern]
        [-f file] [-m num] [--binary-files=value] [--context[=num]]
        [--label=name] [--line-buffered] [--null] [pattern] [file ...]
usage: grep [-abcEFGHhIiLlnoqRsUVvwxZ] [-A num] [-B num] [-C[num]] [-e pattern]
        [-f file] [-m num] [--binary-files=value] [--context[=num]]
        [--label=name] [--line-buffered] [--null] [pattern] [file ...]
xmake, A cross-platform build utility based on Lua.
Copyright (C) 2015-present Ruki Wang, tboox.org, xmake.io
                         _
    __  ___ __  __  __ _| | ______
    \ \/ / |  \/  |/ _  | |/ / __ \
     >  <  | \__/ | /_| |   <  ___/
    /_/\_\_|_|  |_|\__ \|_|\_\____|
                         by ruki, xmake.io

   👉  Manual: https://xmake.io/#/getting_started
   🙏  Donate: https://xmake.io/#/sponsor

downloading https://fastly.jsdelivr.net/gh/xmake-mirror/xmake-releases@v2.7.2/xmake-v2.7.2.xz.run ..
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2567k  100 2567k    0     0  2622k      0 --:--:-- --:--:-- --:--:-- 2622k
Creating directory /tmp/.xmake_getter88297
Verifying archive integrity...  100%   All good.
Uncompressing xmake-v2.7.2-runfile  100%   ... Extraction failed.
getconf: LONG_BIT: unknown variable
getconf: LONG_BIT: unknown variable
compiling xmake-core ...
getconf: LONG_BIT: unknown variable
getconf: LONG_BIT: unknown variable

=============================================================================
compile:
          plat:         bsd
          arch:         x
          host:         bsd
          demo:         y
          prof:         n
          debug:                n
          small:                n
          ccache:
          distcc:
          branch:
          commit:
          luajit:               jit

packages:
        tbox:           y
        luajit:         y
        lua:            y
        base:           y


directories:
          install:
          package:
          backend:              lua

toolchains:
          bin:
          pre:
          sdk:

flags:
          cflag:
          ccflag:
          cxflag:
          mflag:
          mmflag:
          mxflag:
          ldflag:
          asflag:
          arflag:
          shflag:

clean xmake
clean lua
clean lcurses
clean sv
clean lua-cjson
clean lz4
clean tbox
clean xmake
clean demo
make xmake
make lua
compile.r lua/lapi.c
compile.r lua/lauxlib.c
compile.r lua/lbaselib.c
compile.r lua/lcode.c
compile.r lua/lcorolib.c
compile.r lua/lctype.c
compile.r lua/ldblib.c
compile.r lua/ldebug.c
compile.r lua/ldo.c
compile.r lua/ldump.c
compile.r lua/lfunc.c
compile.r lua/lgc.c
compile.r lua/linit.c
compile.r lua/liolib.c
compile.r lua/llex.c
compile.r lua/lmathlib.c
compile.r lua/lmem.c
compile.r lua/loadlib.c
compile.r lua/lobject.c
compile.r lua/lopcodes.c
compile.r lua/loslib.c
compile.r lua/lparser.c
compile.r lua/lstate.c
compile.r lua/lstring.c
compile.r lua/lstrlib.c
compile.r lua/ltable.c
compile.r lua/ltablib.c
compile.r lua/ltests.c
compile.r lua/ltm.c
compile.r lua/lundump.c
compile.r lua/lutf8lib.c
compile.r lua/lvm.c
compile.r lua/lzio.c
link libluar.a
make lcurses
compile.r lcurses.c
link liblcursesr.a
make sv
compile.r sv/src/comp.c
compile.r sv/src/id.c
compile.r sv/src/num.c
compile.r sv/src/range.c
compile.r sv/src/semvers.c
compile.r sv/src/utils.c
compile.r sv/src/version.c
link libsvr.a
make lua-cjson
compile.r lua-cjson/dtoa.c
compile.r lua-cjson/g_fmt.c
compile.r lua-cjson/lua_cjson.c
compile.r lua-cjson/strbuf.c
link liblua-cjsonr.a
make lz4
compile.r lz4/lib/lz4.c
compile.r lz4/lib/lz4frame.c
compile.r lz4/lib/lz4hc.c
compile.r lz4/lib/xxhash.c
link liblz4r.a
make tbox
compile.r tbox/src/tbox/algorithm/binary_find.c
compile.r tbox/src/tbox/algorithm/binary_find_if.c
compile.r tbox/src/tbox/algorithm/bubble_sort.c
compile.r tbox/src/tbox/algorithm/count.c
compile.r tbox/src/tbox/algorithm/count_if.c
compile.r tbox/src/tbox/algorithm/distance.c
compile.r tbox/src/tbox/algorithm/find.c
compile.r tbox/src/tbox/algorithm/find_if.c
compile.r tbox/src/tbox/algorithm/heap_sort.c
compile.r tbox/src/tbox/algorithm/insert_sort.c
compile.r tbox/src/tbox/algorithm/predicate.c
compile.r tbox/src/tbox/algorithm/quick_sort.c
compile.r tbox/src/tbox/algorithm/remove.c
compile.r tbox/src/tbox/algorithm/remove_first.c
compile.r tbox/src/tbox/algorithm/remove_first_if.c
compile.r tbox/src/tbox/algorithm/remove_if.c
compile.r tbox/src/tbox/algorithm/rfind.c
compile.r tbox/src/tbox/algorithm/rfind_if.c
compile.r tbox/src/tbox/algorithm/rwalk.c
compile.r tbox/src/tbox/algorithm/sort.c
compile.r tbox/src/tbox/algorithm/walk.c
compile.r tbox/src/tbox/charset/ascii.c
compile.r tbox/src/tbox/charset/charset.c
compile.r tbox/src/tbox/charset/gb2312.c
compile.r tbox/src/tbox/charset/iso8859.c
compile.r tbox/src/tbox/charset/ucs2.c
compile.r tbox/src/tbox/charset/ucs4.c
compile.r tbox/src/tbox/charset/utf16.c
compile.r tbox/src/tbox/charset/utf32.c
compile.r tbox/src/tbox/charset/utf8.c
compile.r tbox/src/tbox/container/array_iterator.c
compile.r tbox/src/tbox/container/bloom_filter.c
compile.r tbox/src/tbox/container/circle_queue.c
compile.r tbox/src/tbox/container/element/hash.c
compile.r tbox/src/tbox/container/element/long.c
compile.r tbox/src/tbox/container/element/mem.c
compile.r tbox/src/tbox/container/element/null.c
compile.r tbox/src/tbox/container/element/ptr.c
compile.r tbox/src/tbox/container/element/size.c
compile.r tbox/src/tbox/container/element/str.c
compile.r tbox/src/tbox/container/element/true.c
compile.r tbox/src/tbox/container/element/uint16.c
compile.r tbox/src/tbox/container/element/uint32.c
compile.r tbox/src/tbox/container/element/uint8.c
compile.r tbox/src/tbox/container/hash_map.c
compile.r tbox/src/tbox/container/hash_set.c
compile.r tbox/src/tbox/container/heap.c
compile.r tbox/src/tbox/container/iterator.c
compile.r tbox/src/tbox/container/list.c
compile.r tbox/src/tbox/container/list_entry.c
compile.r tbox/src/tbox/container/priority_queue.c
compile.r tbox/src/tbox/container/queue.c
compile.r tbox/src/tbox/container/single_list.c
compile.r tbox/src/tbox/container/single_list_entry.c
compile.r tbox/src/tbox/container/stack.c
compile.r tbox/src/tbox/container/vector.c
compile.r tbox/src/tbox/hash/adler32.c
compile.r tbox/src/tbox/hash/bkdr.c
compile.r tbox/src/tbox/hash/fnv32.c
compile.r tbox/src/tbox/hash/md5.c
compile.r tbox/src/tbox/hash/sha.c
compile.r tbox/src/tbox/hash/uuid.c
compile.r tbox/src/tbox/libc/impl/libc.c
compile.r tbox/src/tbox/libc/misc/time/gmmktime.c
compile.r tbox/src/tbox/libc/misc/time/gmtime.c
compile.r tbox/src/tbox/libc/misc/time/localtime.c
compile.r tbox/src/tbox/libc/misc/time/mktime.c
compile.r tbox/src/tbox/libc/misc/time/time.c
compile.r tbox/src/tbox/libc/stdio/printf.c
compile.r tbox/src/tbox/libc/stdio/printf_object.c
compile.r tbox/src/tbox/libc/stdio/puts.c
compile.r tbox/src/tbox/libc/stdio/snprintf.c
compile.r tbox/src/tbox/libc/stdio/sprintf.c
compile.r tbox/src/tbox/libc/stdio/swprintf.c
compile.r tbox/src/tbox/libc/stdio/vsnprintf.c
compile.r tbox/src/tbox/libc/stdio/vswprintf.c
compile.r tbox/src/tbox/libc/stdio/wprintf.c
compile.r tbox/src/tbox/libc/stdio/wputs.c
compile.r tbox/src/tbox/libc/stdlib/mbstowcs.c
compile.r tbox/src/tbox/libc/stdlib/random.c
compile.r tbox/src/tbox/libc/stdlib/stdlib.c
compile.r tbox/src/tbox/libc/stdlib/wcstombs.c
compile.r tbox/src/tbox/libc/string/memcmp.c
compile.r tbox/src/tbox/libc/string/memcpy.c
compile.r tbox/src/tbox/libc/string/memdup.c
compile.r tbox/src/tbox/libc/string/memmem.c
compile.r tbox/src/tbox/libc/string/memmov.c
compile.r tbox/src/tbox/libc/string/memset.c
compile.r tbox/src/tbox/libc/string/strcat.c
compile.r tbox/src/tbox/libc/string/strchr.c
compile.r tbox/src/tbox/libc/string/strcmp.c
compile.r tbox/src/tbox/libc/string/strcpy.c
compile.r tbox/src/tbox/libc/string/strdup.c
compile.r tbox/src/tbox/libc/string/strichr.c
compile.r tbox/src/tbox/libc/string/stricmp.c
compile.r tbox/src/tbox/libc/string/strirchr.c
compile.r tbox/src/tbox/libc/string/strirstr.c
compile.r tbox/src/tbox/libc/string/stristr.c
compile.r tbox/src/tbox/libc/string/strlcpy.c
compile.r tbox/src/tbox/libc/string/strlen.c
compile.r tbox/src/tbox/libc/string/strncat.c
compile.r tbox/src/tbox/libc/string/strnchr.c
compile.r tbox/src/tbox/libc/string/strncmp.c
compile.r tbox/src/tbox/libc/string/strncpy.c
compile.r tbox/src/tbox/libc/string/strndup.c
compile.r tbox/src/tbox/libc/string/strnicmp.c
compile.r tbox/src/tbox/libc/string/strnirchr.c
compile.r tbox/src/tbox/libc/string/strnirstr.c
compile.r tbox/src/tbox/libc/string/strnistr.c
compile.r tbox/src/tbox/libc/string/strnlen.c
compile.r tbox/src/tbox/libc/string/strnrchr.c
compile.r tbox/src/tbox/libc/string/strnrstr.c
compile.r tbox/src/tbox/libc/string/strnstr.c
compile.r tbox/src/tbox/libc/string/strrchr.c
compile.r tbox/src/tbox/libc/string/strrstr.c
compile.r tbox/src/tbox/libc/string/strstr.c
compile.r tbox/src/tbox/libc/string/wcscat.c
compile.r tbox/src/tbox/libc/string/wcschr.c
compile.r tbox/src/tbox/libc/string/wcscmp.c
compile.r tbox/src/tbox/libc/string/wcscpy.c
compile.r tbox/src/tbox/libc/string/wcsdup.c
compile.r tbox/src/tbox/libc/string/wcsichr.c
compile.r tbox/src/tbox/libc/string/wcsicmp.c
compile.r tbox/src/tbox/libc/string/wcsirchr.c
compile.r tbox/src/tbox/libc/string/wcsirstr.c
compile.r tbox/src/tbox/libc/string/wcsistr.c
compile.r tbox/src/tbox/libc/string/wcslcpy.c
compile.r tbox/src/tbox/libc/string/wcslen.c
compile.r tbox/src/tbox/libc/string/wcsncat.c
compile.r tbox/src/tbox/libc/string/wcsncmp.c
compile.r tbox/src/tbox/libc/string/wcsncpy.c
compile.r tbox/src/tbox/libc/string/wcsndup.c
compile.r tbox/src/tbox/libc/string/wcsnicmp.c
compile.r tbox/src/tbox/libc/string/wcsnirchr.c
compile.r tbox/src/tbox/libc/string/wcsnirstr.c
compile.r tbox/src/tbox/libc/string/wcsnlen.c
compile.r tbox/src/tbox/libc/string/wcsnrchr.c
compile.r tbox/src/tbox/libc/string/wcsnrstr.c
compile.r tbox/src/tbox/libc/string/wcsrchr.c
compile.r tbox/src/tbox/libc/string/wcsrstr.c
compile.r tbox/src/tbox/libc/string/wcsstr.c
compile.r tbox/src/tbox/libm/cos.c
compile.r tbox/src/tbox/libm/cosf.c
compile.r tbox/src/tbox/libm/exp.c
compile.r tbox/src/tbox/libm/idivi8.c
compile.r tbox/src/tbox/libm/ilog2i.c
compile.r tbox/src/tbox/libm/impl/libm.c
compile.r tbox/src/tbox/libm/isfin.c
compile.r tbox/src/tbox/libm/isfinf.c
compile.r tbox/src/tbox/libm/isinf.c
compile.r tbox/src/tbox/libm/isinff.c
compile.r tbox/src/tbox/libm/isnan.c
compile.r tbox/src/tbox/libm/isnanf.c
compile.r tbox/src/tbox/libm/isqrti.c
compile.r tbox/src/tbox/libm/pow.c
compile.r tbox/src/tbox/libm/sqrtf.c
compile.r tbox/src/tbox/math/impl/math.c
compile.r tbox/src/tbox/math/random/linear.c
compile.r tbox/src/tbox/math/random/random.c
compile.r tbox/src/tbox/memory/allocator.c
compile.r tbox/src/tbox/memory/buffer.c
compile.r tbox/src/tbox/memory/default_allocator.c
compile.r tbox/src/tbox/memory/fixed_pool.c
compile.r tbox/src/tbox/memory/impl/memory.c
compile.r tbox/src/tbox/memory/impl/native_large_allocator.c
compile.r tbox/src/tbox/memory/impl/prefix.c
compile.r tbox/src/tbox/memory/impl/static_fixed_pool.c
compile.r tbox/src/tbox/memory/impl/static_large_allocator.c
compile.r tbox/src/tbox/memory/large_allocator.c
compile.r tbox/src/tbox/memory/native_allocator.c
compile.r tbox/src/tbox/memory/queue_buffer.c
compile.r tbox/src/tbox/memory/small_allocator.c
compile.r tbox/src/tbox/memory/static_allocator.c
compile.r tbox/src/tbox/memory/static_buffer.c
compile.r tbox/src/tbox/memory/string_pool.c
compile.r tbox/src/tbox/network/cookies.c
compile.r tbox/src/tbox/network/dns/cache.c
compile.r tbox/src/tbox/network/dns/looker.c
compile.r tbox/src/tbox/network/dns/server.c
compile.r tbox/src/tbox/network/http.c
compile.r tbox/src/tbox/network/hwaddr.c
compile.r tbox/src/tbox/network/impl/http/date.c
compile.r tbox/src/tbox/network/impl/http/method.c
compile.r tbox/src/tbox/network/impl/http/option.c
compile.r tbox/src/tbox/network/impl/http/status.c
compile.r tbox/src/tbox/network/impl/network.c
compile.r tbox/src/tbox/network/ipaddr.c
compile.r tbox/src/tbox/network/ipv4.c
compile.r tbox/src/tbox/network/ipv6.c
compile.r tbox/src/tbox/network/unixaddr.c
compile.r tbox/src/tbox/network/url.c
compile.r tbox/src/tbox/platform/addrinfo.c
compile.r tbox/src/tbox/platform/atomic64.c
compile.r tbox/src/tbox/platform/backtrace.c
compile.r tbox/src/tbox/platform/cache_time.c
compile.r tbox/src/tbox/platform/cpu.c
compile.r tbox/src/tbox/platform/directory.c
compile.r tbox/src/tbox/platform/dynamic.c
compile.r tbox/src/tbox/platform/environment.c
compile.r tbox/src/tbox/platform/event.c
compile.r tbox/src/tbox/platform/file.c
compile.r tbox/src/tbox/platform/filelock.c
compile.r tbox/src/tbox/platform/fwatcher.c
compile.r tbox/src/tbox/platform/hostname.c
compile.r tbox/src/tbox/platform/ifaddrs.c
compile.r tbox/src/tbox/platform/impl/charset.c
compile.r tbox/src/tbox/platform/impl/dns.c
compile.r tbox/src/tbox/platform/impl/platform.c
compile.r tbox/src/tbox/platform/impl/pollerdata.c
compile.r tbox/src/tbox/platform/ltimer.c
compile.r tbox/src/tbox/platform/mutex.c
compile.r tbox/src/tbox/platform/native_memory.c
compile.r tbox/src/tbox/platform/page.c
compile.r tbox/src/tbox/platform/path.c
compile.r tbox/src/tbox/platform/pipe.c
compile.r tbox/src/tbox/platform/poller.c
compile.r tbox/src/tbox/platform/print.c
compile.r tbox/src/tbox/platform/process.c
compile.r tbox/src/tbox/platform/sched.c
compile.r tbox/src/tbox/platform/semaphore.c
compile.r tbox/src/tbox/platform/socket.c
compile.r tbox/src/tbox/platform/stdfile.c
compile.r tbox/src/tbox/platform/syserror.c
compile.r tbox/src/tbox/platform/thread.c
compile.r tbox/src/tbox/platform/thread_local.c
compile.r tbox/src/tbox/platform/time.c
compile.r tbox/src/tbox/platform/timer.c
compile.r tbox/src/tbox/platform/virtual_memory.c
compile.r tbox/src/tbox/prefix/state.c
compile.r tbox/src/tbox/stream/filter.c
compile.r tbox/src/tbox/stream/impl/filter/cache.c
compile.r tbox/src/tbox/stream/impl/filter/charset.c
compile.r tbox/src/tbox/stream/impl/filter/chunked.c
compile.r tbox/src/tbox/stream/impl/stream/data.c
compile.r tbox/src/tbox/stream/impl/stream/file.c
compile.r tbox/src/tbox/stream/impl/stream/filter.c
compile.r tbox/src/tbox/stream/impl/stream/http.c
compile.r tbox/src/tbox/stream/impl/stream/sock.c
compile.r tbox/src/tbox/stream/static_stream.c
compile.r tbox/src/tbox/stream/stream.c
compile.r tbox/src/tbox/stream/transfer.c
compile.r tbox/src/tbox/string/static_string.c
compile.r tbox/src/tbox/string/string.c
compile.r tbox/src/tbox/tbox.c
compile.r tbox/src/tbox/utils/base32.c
compile.r tbox/src/tbox/utils/base64.c
compile.r tbox/src/tbox/utils/bits.c
compile.r tbox/src/tbox/utils/dump.c
compile.r tbox/src/tbox/utils/lock_profiler.c
compile.r tbox/src/tbox/utils/singleton.c
compile.r tbox/src/tbox/utils/trace.c
compile.r tbox/src/tbox/utils/url.c
compile.r tbox/src/tbox/utils/used.c
link libtboxr.a
make xmake
compile.r base64/decode.c
compile.r base64/encode.c
compile.r bloom_filter/bloom_filter_clear.c
compile.r bloom_filter/bloom_filter_close.c
compile.r bloom_filter/bloom_filter_data.c
compile.r bloom_filter/bloom_filter_data_set.c
compile.r bloom_filter/bloom_filter_get.c
compile.r bloom_filter/bloom_filter_open.c
compile.r bloom_filter/bloom_filter_set.c
compile.r bloom_filter/bloom_filter_size.c
compile.r engine.c
gmake[3]: *** [/tmp/.xmake_getter88297/core/suffix.mak:308:engine.o] 錯誤 1
gmake[2]: *** [/tmp/.xmake_getter88297/core/suffix.mak:310:DEP_PROS_xmake_all] 錯誤 2
engine.c:651:77: error: use of undeclared identifier 'KERN_PROC_PATHNAME'
        tb_int_t mib[4];  mib[0] = CTL_KERN;  mib[1] = KERN_PROC;  mib[2] = KERN_PROC_PATHNAME;  mib[3] = -1;
                                                                            ^
1 error generated.
getconf: LONG_BIT: unknown variable
getconf: LONG_BIT: unknown variable
installing to /home/niko/.local ...
plat: bsd
arch: x
cp: ./core/src/demo/demo.b: No such file or directory
gmake: *** [makefile:122:install] 錯誤 1
Install Fail

Expected Behavior

Compile without error(s).

Project Configuration

No response

Additional Information and Error Logs

No response

@ChihHao-Su ChihHao-Su added the bug label Oct 20, 2022
@waruqi
Copy link
Member

waruqi commented Oct 20, 2022

I just tested it on FreeBSD and I have not OpenBSD to test it. Can you open a pr to fix it directly?

@waruqi
Copy link
Member

waruqi commented Oct 20, 2022

ohmm, There is currently no way to get the executable path on OpenBSD

https://chromium.googlesource.com/chromium/src/+/refs/heads/main/base/base_paths_posix.cc#71

@ChihHao-Su
Copy link
Author

https://www.reddit.com/r/openbsd/comments/slsbll/is_there_a_way_to_get_the_current_executable_path

Deftly, a OpenBSD Developer says:

There is a realpath exe you can use in current: https://man.openbsd.org/realpath

@waruqi
Copy link
Member

waruqi commented Oct 20, 2022

https://www.reddit.com/r/openbsd/comments/slsbll/is_there_a_way_to_get_the_current_executable_path

You can try this and open a pr.

I added a fallback solution on dev branch, it maybe work.
e6affab

bash <(curl -fsSL https://xmake.io/shget.text) dev

@ChihHao-Su
Copy link
Author

I'm gonna try it.

@waruqi waruqi added this to the v2.7.3 milestone Oct 20, 2022
@waruqi
Copy link
Member

waruqi commented Oct 21, 2022

Does it work now?

@ChihHao-Su
Copy link
Author

ChihHao-Su commented Oct 21, 2022 via email

@waruqi
Copy link
Member

waruqi commented Oct 24, 2022

再试下,应该可以了

@waruqi waruqi closed this as completed Oct 25, 2022
@ChihHao-Su
Copy link
Author

ChihHao-Su commented Oct 26, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants