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

brew install monkeys-audio fails #3

Open
GordonFreemanK opened this issue Oct 23, 2021 · 1 comment
Open

brew install monkeys-audio fails #3

GordonFreemanK opened this issue Oct 23, 2021 · 1 comment

Comments

@GordonFreemanK
Copy link

GordonFreemanK commented Oct 23, 2021

Hello! Thank you for your work!

The following is happening on Ubuntu 21.10:

==> Installing fernandotcl/fernandotcl/monkeys-audio
==> cmake .
==> make install
Last 15 lines from /home/evren-nuc/.cache/Homebrew/Logs/monkeys-audio/02.make:
/home/linuxbrew/.linuxbrew/Cellar/cmake/3.21.3_1/bin/cmake -E cmake_link_script CMakeFiles/Sample1.dir/link.txt --verbose=1
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-11  -O3 -Wall -pedantic -Wno-long-long -O3 -DNDEBUG -rdynamic CMakeFiles/Sample1.dir/src/Examples/Analyze/Sample1/Sample1.cpp.o -o Sample1  libmac.a -lrt 
/home/linuxbrew/.linuxbrew/bin/ld: i386 architecture of input file `libmac.a(x86_64_mmx.asm.o)' is incompatible with i386:x86-64 output
/home/linuxbrew/.linuxbrew/bin/ld: i386 architecture of input file `libmac.a(x86_64_mmx.asm.o)' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mac.dir/build.make:101: mac] Error 1
make[2]: Leaving directory '/tmp/monkeys-audio-20211023-4084266-1k5g50i/monkeys-audio-release-3.99.6'
make[1]: *** [CMakeFiles/Makefile2:116: CMakeFiles/mac.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/Sample1.dir/build.make:101: Sample1] Error 1
make[2]: Leaving directory '/tmp/monkeys-audio-20211023-4084266-1k5g50i/monkeys-audio-release-3.99.6'
make[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/Sample1.dir/all] Error 2
make[1]: Leaving directory '/tmp/monkeys-audio-20211023-4084266-1k5g50i/monkeys-audio-release-3.99.6'
make: *** [Makefile:139: all] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/fernandotcl/homebrew-fernandotcl/issues

Some more information that might be useful:

me@me:~$ brew -v
Homebrew 3.2.17
Homebrew/homebrew-core (git revision 451b17beeea; last commit 2021-10-23)
me@me~$ brew tap
fernandotcl/fernandotcl
homebrew/core
me@me:~$ brew list
==> Formulae
binutils  ca-certificates  cmake  gcc  gmp  isl  libmpc  mpfr  ncurses	[email protected]  yasm  zlib  zstd
me@me:~$ brew list gcc
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/c++-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/cpp-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/g++-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcc-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcc-ar-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcc-nm-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcc-ranlib-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcov-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcov-dump-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gcov-tool-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gdc
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gdc-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gfortran
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/gfortran-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/lto-dump-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-c++-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-g++-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gcc-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gcc-11.2.0
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gcc-ar-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gcc-nm-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gcc-ranlib-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gdc-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/bin/x86_64-pc-linux-gnu-gfortran-11
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/include/c++/ (796 files)
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/lib/gcc/ (1328 files)
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/lib/ (5 files)
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/libexec/gcc/ (17 files)
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/share/gcc-11.2.0/ (4 files)
/home/linuxbrew/.linuxbrew/Cellar/gcc/11.2.0/share/man/ (12 files)
me@me:~$ yasm -a help
Available yasm architectures:
    x86         x86 (IA-32 and derivatives), AMD64
    lc3b        LC-3b
me@me:~$ 
@GordonFreemanK
Copy link
Author

I'm very green on C++/make, but based on the "bugs" section in the yasm man page (http://manpages.ubuntu.com/manpages/impish/man7/yasm_arch.7.html) I've investigated a bit using brew install --verbose and found this line:

/home/linuxbrew/.linuxbrew/bin/yasm -I/tmp/monkeys-audio-20211026-2838857-1wqehno/monkeys-audio-release-3.99.6 -I/tmp/monkeys-audio-20211026-2838857-1wqehno/monkeys-audio-release-3.99.6/src/Shared -I/tmp/monkeys-audio-20211026-2838857-1wqehno/monkeys-audio-release-3.99.6/src/MACLib -f elf -o CMakeFiles/libmac.dir/src/MACLib/Assembly/x86_64_mmx.asm.o /tmp/monkeys-audio-20211026-2838857-1wqehno/monkeys-audio-release-3.99.6/src/MACLib/Assembly/x86_64_mmx.asm

I might be wrong but it's possible it should say -f elf64 here and not -f elf.

I know very little about brew but I tried brew install monkeys-audio -i and at the interactive command line, edited the cmake configuration (nano CMakeLists.txt) and replaced set(CMAKE_ASM_NASM_OBJECT_FORMAT "elf") with set(CMAKE_ASM_NASM_OBJECT_FORMAT "elf64") (https://github.com/fernandotcl/monkeys-audio/blob/5fe956c7e67c13daa80518a4cc7001e9fa185297/CMakeLists.txt#L56) then

cmake .
sudo make install
exit

(which does build succesfully and returns from the interactive command and into the brew install command. brew still outputs an error (Error: Empty installation) which seems wrong, and the package doesn't appear to be installed in brew (doesn't show in brew list) so I'm missing a step but now mac is recognized as a command:

me@me:~$ mac
Usage: [Input File] [Output File] [Mode]

Modes:
    Compress (fast): '-c1000'
    Compress (normal): '-c2000'
    Compress (high): '-c3000'
    Compress (extra high): '-c4000'
    Compress (insane): '-c5000'
    Decompress: '-d'
    Verify: '-v'
    Convert: '-nXXXX'

Examples:
    Compress: mac "Metallica - One.wav" "Metallica - One.ape" -c2000
    Decompress: mac "Metallica - One.ape" "Metallica - One.wav" -d
    Verify: mac "Metallica - One.ape" -v

If I now run brew install monkeys-audio -d and ignore when the error appears, the package is installed.

So tl;dr, I think there should be some logic here to specify elf or elf64 depending on the CPU architecture.

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

1 participant