dimitre / ofbuild

of build
5 stars 1 forks source link

chalet build fails if no tvOS sdk present #3

Open artificiel opened 1 year ago

artificiel commented 1 year ago

I sometimes remove superfluous Xcode SDKs (tvOS and watchOS, as well as older iOS versions).

% /opt/homebrew/Caskroom/chalet/0.5.21/chalet build
ERROR: .chaletrc: The 'appletvos' SDK path was either not found or from a version of Xcode that has since been removed.
dimitre commented 1 year ago

this one I suggest you manually remove the lines in .chaletrc since it is generated in your site, it is not on git

dimitre commented 1 year ago

Thanks for trying it out. could you compile ok @artificiel? I'm studying a way of automatizing build in github actions so it can be installed via homebrew.

artificiel commented 1 year ago

hmmm the error message does mention .chaletrc but I don't see it anywhere?

ofbuild % tree -a . 
.
├── .DS_Store
├── .git
│   ├── .DS_Store
│   ├── HEAD
│   ├── config
│   ├── description
│   ├── hooks
│   │   ├── applypatch-msg.sample
│   │   ├── commit-msg.sample
│   │   ├── fsmonitor-watchman.sample
│   │   ├── post-update.sample
│   │   ├── pre-applypatch.sample
│   │   ├── pre-commit.sample
│   │   ├── pre-merge-commit.sample
│   │   ├── pre-push.sample
│   │   ├── pre-rebase.sample
│   │   ├── pre-receive.sample
│   │   ├── prepare-commit-msg.sample
│   │   ├── push-to-checkout.sample
│   │   └── update.sample
│   ├── index
│   ├── info
│   │   └── exclude
│   ├── logs
│   │   ├── HEAD
│   │   └── refs
│   │       ├── heads
│   │       │   └── main
│   │       └── remotes
│   │           └── origin
│   │               └── HEAD
│   ├── objects
│   │   ├── info
│   │   └── pack
│   │       ├── pack-6046a7886c7c5fd057030eb2f51dd592590e7dc6.idx
│   │       └── pack-6046a7886c7c5fd057030eb2f51dd592590e7dc6.pack
│   ├── packed-refs
│   └── refs
│       ├── heads
│       │   └── main
│       ├── remotes
│       │   └── origin
│       │       └── HEAD
│       └── tags
├── .github
│   └── workflows
│       └── macos.yml
├── .gitignore
├── Project.xcconfig
├── README.md
├── addons.make
├── chalet.json
├── of.yml
└── src
    ├── .DS_Store
    └── main.cpp

20 directories, 37 files
dimitre commented 1 year ago

it is not on git, but maybe it is created once you run chalet build

artificiel commented 1 year ago

well the above tree is my local working tree including hidden files, after running chalet build. I notice also a ~/.chalet but it's empty. find ~ -name "*chalet*" doesn't reveal anything else.

dimitre commented 1 year ago

please try the command

chalet configure -t apple-llvm -a auto
dimitre commented 1 year ago

I should use an alternative build system for now. maybe CMake or Ninja, as the project is simple and doesn't have many dependencies.

dimitre commented 1 year ago

@artificiel I've just pushed .chaletrc to the git

artificiel commented 1 year ago

ok I pulled the .chaletrc and edited to remove the tvOS and watchOS SDK, but I get the same error...? also same with the configure command:

ofbuild % /opt/homebrew/Caskroom/chalet/0.5.21/chalet build
ERROR: .chaletrc: The 'appletvos' SDK path was either not found or from a version of Xcode that has since been removed.
ofbuild % /opt/homebrew/Caskroom/chalet/0.5.21/chalet  configure -t apple-llvm -a auto
ERROR: .chaletrc: The 'appletvos' SDK path was either not found or from a version of Xcode that has since been removed.

chaletrc.zip

dimitre commented 1 year ago

ok, maybe it is a good idea to open an issue on chalet repository to see if SDKs should not be enforced.

artificiel commented 1 year ago

ok but it's not so clear what chalet does vs ofbuild in terms of "config"?

about the contents of the .chaletrc -- the one you provided indicates mac13.1 SDK, but that's not present on one of my machines, and i get the same tvos error (even if i remove references).

also for example i don't have ninja on the macOS machines (just noticed it's in the .chaletrc too).

because the error message references tvos and .chaletrc, and that the .chaletrc does not contain reference to tvos, maybe something else is being generated behind the scenes?

(i looked for a "verbose" flag for chalet but did not find one -- how do you figure out what is going on inside? (it takes many seconds of "blank processing" before outputting the tvos error)).

dimitre commented 1 year ago

I suppose the only way of figuring out what is going inside is reading the code on Chalet repository, I really don't know what it is doing exactly behind the scenes. the motivation of using it was automating the cloning, building libraries and linking. I suppose this can be easily done with other more broadly used tools too, even Make

artificiel commented 1 year ago

ah well even g++ then:

g++ -std=c++17 `pkg-config --libs --cflags fmt yaml-cpp` src/main.cpp -o ofbuild

I'll leave this issue open as the chalet still needs clarifying/updating and move to another issue for the further stuff

dimitre commented 1 year ago

Great! Looking forward to hear your thoughts on the tool itself

dimitre commented 1 year ago

@artificiel can you help me pointing in the right direction of making a script to build with your suggestion

g++ -std=c++17 `pkg-config --libs --cflags fmt yaml-cpp` src/main.cpp -o ofbuild
artificiel commented 1 year ago

I'm not sure exactly what you aim for, but pkg-build leverages the os-installed packages, so on macOS it means doing (presuming brew and a compiler toolchain are already present):

brew install pkg-config yaml-cpp fmt
g++ -std=c++17 `pkg-config --libs --cflags fmt yaml-cpp` src/main.cpp -o ofbuild

cross platform (POSIXish, at least) means changing the brew line for the appropriate platform package manager.

calling g++ directly here is reasonnable because it's a straightforward .cpp -> executable. probably that -O2 would not hurt, and perhaps other flags. when the line gets too gnarly a Makefile (with the same pkg-build calls) is the next logical step (and then autotools, CMake and other build management tools).

[edit to correct the package name to pkg-config and not pkg-build]

Guedesou commented 7 months ago

Guys please report this. Github dont use this Space tô recruiting devs. Probaly scammer.

dimitre commented 7 months ago

@Guedesou yes I've seen this in other places. they post and erase so it is not possible to report. maybe you have better luck as you received the tagged notification by email