Open omarmn opened 1 year ago
Maybe you want to use 4.13.1 instead of 5.0.0? I was able to get this to install under Rosetta with a new Mac (M2) after some playing around with it. Here's what I did:
arch -x86_64 zsh
. With the switching described in the linked post, you should be using x86 in the whole brew toolchainopam init
, opam switch create 4.13.1
, and opam install taglib mad lame vorbis cry samplerate liquidsoap.1.4.4
Good luck!
The downside is that all OCaml/opam work should be done in Rosetta for this user or the .opam
directory may become a messβI didn't try to figure out how to maintain a separate arm64 install. This is fine for me, but could be a problem if you want to do any additional OCaml work.
I'm not familiar with the toolchain so I can't explain all of the reasoning here, but I ran into the same issue using macports and was able to resolve so i'll add some ideas;
opam depext lame
? Doing so seemed to resolve issues for me. I believe it might be related to changes in the toolchain where depext is being deprecated, however is still needed here because there is no conf file like this in the repo (note the depexts section)I successfully installed liquidsoap via opam on x86 macos with ocaml 5.1 using these extra steps
Awesome thanks both. The project is currently on pause, shifted focus on other tasks. Once I get back to it, will report back :)
Same problem here with MacOS on Apple M1 / Sonoma 14.2.1
% opam install lame
Constructing initial basis...
Number of 0-1 knapsack inequalities = 4639
Constructing conflict graph...
Conflict graph has 1165 + 413 = 1578 vertices
The following actions will be performed:
β install lame 0.3.7
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved lame.0.3.7 (cached)
[ERROR] The compilation of lame.0.3.7 failed at "dune build -p lame -j 7 @install".
#=== ERROR while compiling lame.0.3.7 =========================================#
# context 2.1.5 | macos/arm64 | ocaml.5.1.1 | https://opam.ocaml.org#6d3d7021
# path ~/.opam/default/.opam-switch/build/lame.0.3.7
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p lame -j 7 @install
# exit-code 1
# env-file ~/.opam/log/lame-78701-7855f9.env
# output-file ~/.opam/log/lame-78701-7855f9.out
### output ###
# compiling c program:
# [...]
# | return 0;
# | }
# run: cc -O2 -fno-strict-aliasing -fwrapv -pthread -I /Users/lagune/.opam/default/lib/ocaml -o /var/folders/4g/rssv0wg15qxf3q3crvw2tdsr0000gn/T/build_a3cfa9_dune/ocaml-configurator194737/c-test-0/test.exe /var/folders/4g/rssv0wg15qxf3q3crvw2tdsr0000gn/T/build_a3cfa9_dune/ocaml-configurator194737/c-test-0/test.c -lpthread -lmp3lame -lm
# -> process exited with code 1
# -> stdout:
# -> stderr:
# | /var/folders/4g/rssv0wg15qxf3q3crvw2tdsr0000gn/T/build_a3cfa9_dune/ocaml-configurator194737/c-test-0/test.c:2:10: fatal error: 'lame/lame.h' file not found
# | #include <lame/lame.h>
# | ^~~~~~~~~~~~~
# | 1 error generated.
# Fatal error: exception File "src/config/discover.ml", line 23, characters 6-12: Assertion failed
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build lame 0.3.7
ββ
βΆβ No changes have been performed
# Run eval $(opam env) to update the current shell environment
I finally managed to install lame
with this command
% CPATH=/opt/homebrew/include LIBRARY_PATH=/opt/homebrew/lib opam install lame
Constructing initial basis...
Number of 0-1 knapsack inequalities = 194
Constructing conflict graph...
Conflict graph has 88 + 13 = 101 vertices
The following actions will be performed:
β install lame 0.3.7
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved lame.0.3.7 (cached)
β installed lame.0.3.7
Done.
It was clearly written on the home page here : https://www.liquidsoap.info/doc-2.2.3/install.html :)
Hi, I've restarted the project and once I set the PATHS as per above it worked for me too. I was following the instructions in the PDF, which didn't have those steps there. Thanks for pointing out this web page.
Trying to install liquidsoap on Mac as per instructions on the book. I am using opam to install it. All packages install fine expect lame. I am not a developer by trade, but I'm self taught and I do as much as I can. I am helping 2 community radios to automate their processes here using liquidsoap, and this is causing a major blocker for us. Any help would be much appreciated. I get the following error when installing lame using opam:
compiling c program:
For some reason, the "include" line is not finding the lame.h. I have installed lame using "brew", I can see it installed and lame.h file is there under the include folder in the LAME brew folders.
I am a little bit out of my depths here, but I tried editing the discover.ml file and I added an absolute path to the lame.h file to the include line, but that didn't work. I tried to copy the lame.h to the same place as discover.ml file, no luck here. I also tried another Mac (which is fresh out of the box) that had exactly the same problem.
Thanks :)