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

Unable to tebako setup on MacOS, also no ARM dockerfiles available. #229

Open
jneen opened this issue Jan 6, 2025 · 3 comments
Open

Unable to tebako setup on MacOS, also no ARM dockerfiles available. #229

jneen opened this issue Jan 6, 2025 · 3 comments
Assignees

Comments

@jneen
Copy link

jneen commented Jan 6, 2025

Hi there!

I would like to try using this software on MacOS, but I am unable to use either the Docker workflow, nor can I successfully run the compilation steps in tebako setup.

$ uname -a
Darwin lavender.[redacted] 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1 RELEASE_ARM64_T6000 arm64
[tebako-setup.log](https://github.com/user-attachments/files/18324776/tebako-setup.log)

$ env | grep 'CFLAGS\|CPPFLAGS\|LDFLAGS\|PKG_CONFIG_PATH' | copy
PKG_CONFIG_PATH=/Users/jneen/.local/lib/pkgconfig:/opt/homebrew/opt/curl/lib/pkgconfig:/opt/homebrew/opt/zlib/lib/pkgconfig:/opt/homebrew/opt/bison/lib/pkgconfig:/opt/homebrew/opt/flex/lib/pkgconfig:/opt/homebrew/opt/ccache/lib/pkgconfig:/opt/homebrew/opt/binutils/lib/pkgconfig:/opt/homebrew/opt/llvm/lib/pkgconfig:/opt/homebrew/lib/pkgconfig:/Library/Developer/CommandLineTools/usr/lib/pkgconfig:/opt/homebrew/opt/ccache/bin/lib/pkgconfig:/opt/homebrew/opt/binutils/bin/lib/pkgconfig:/opt/homebrew/opt/curl/bin/lib/pkgconfig:/opt/homebrew/opt/zlib/bin/lib/pkgconfig:/opt/homebrew/opt/bison/bin/lib/pkgconfig:/opt/homebrew/opt/flex/bin/lib/pkgconfig:/opt/homebrew/opt/llvm/bin/lib/pkgconfig
LDFLAGS=-L/Users/jneen/.local/lib -L/opt/homebrew/opt/curl/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/bison/lib -L/opt/homebrew/opt/flex/lib -L/opt/homebrew/opt/ccache/lib -L/opt/homebrew/opt/binutils/lib -L/opt/homebrew/opt/llvm/lib -L/opt/homebrew/lib -L/Library/Developer/CommandLineTools/usr/lib
CPPFLAGS=-I/Users/jneen/.local/include -I/opt/homebrew/opt/curl/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/bison/include -I/opt/homebrew/opt/flex/include -I/opt/homebrew/opt/ccache/include -I/opt/homebrew/opt/binutils/include -I/opt/homebrew/opt/llvm/include -I/opt/homebrew/include -I/Library/Developer/CommandLineTools/usr/include
CFLAGS=-I/Users/jneen/.local/include -I/opt/homebrew/opt/curl/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/bison/include -I/opt/homebrew/opt/flex/include -I/opt/homebrew/opt/ccache/include -I/opt/homebrew/opt/binutils/include -I/opt/homebrew/opt/llvm/include -I/opt/homebrew/include -I/Library/Developer/CommandLineTools/usr/include

$ type bison
bison is hashed (/opt/homebrew/opt/bison/bin/bison)

$ bison --version
bison (GNU Bison) 3.8.2
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ LG_VADDR=39 tebako setup -R 3.4.1 -p ./.tebako 2>&1 | tee /tmp/tebako-setup.log
(see log)

tebako-setup.log

As for the Docker workflow, it seems the architecture in the Dockerfiles is hardcoded to x64.

Thank you for your help!

@maxirmx maxirmx self-assigned this Jan 8, 2025
@maxirmx
Copy link
Member

maxirmx commented Jan 8, 2025

Hi, @jneen

Thank you for your issue.

  1. Docker on macOS uses a lightweight Linux virtual machine under the hood. So it is not native macOS environment, it is linux environment on macOS. Tebako requires macOS libraries and runtime, which aren't available in Linux-based containers. That is the reason why we do not have MacOS container.

  2. tebako setup fails because there is inconsistency in compiler configuration

There are multiple errors like this one:

In file included from /Users/jneen/src/ramekin/.tebako/deps/src/_dwarfs_wr/deps/src/_jemalloc/src/jemalloc_cpp.cpp:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/mutex:190:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__chrono/steady_clock.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__chrono/duration.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/three_way_comparable.h:12:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__compare/common_comparison_category.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:41:
./version:1:1: error: expected unqualified-id

You can see here that it crashes because llvm clang 19 is attempting to use include files from
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include which are Apple Clang 15

There are other issues of similar origin.

@maxirmx
Copy link
Member

maxirmx commented Jan 8, 2025

I would suggest to do the following

  1. ensure that there are consistent CC, CXX, LD and PATH settings
  2. ensure that there is only one and consistent set of libraries is selected with CFLAGS, CPPFLAGS and LDFLAGS

IMHO having both -I/opt/homebrew/opt/llvm/include and -I/Library/Developer/CommandLineTools/usr/include on -I/Library/Developer/CommandLineTools/usr/include does not work because they are not compatible

@bradgessler
Copy link
Contributor

@jneen is your intent to compile arm64 ubuntu packages from arm64 macOS host? Or are you trying to compile amd64 packages from a macOS arm64 host?

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

3 participants