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

RNNoise v0.2 does not compile on Mac and Linux #222

Open
grazder opened this issue Apr 15, 2024 · 8 comments
Open

RNNoise v0.2 does not compile on Mac and Linux #222

grazder opened this issue Apr 15, 2024 · 8 comments

Comments

@grazder
Copy link

grazder commented Apr 15, 2024

I'm doing similar steps that worked for me:

git clone https://github.com/xiph/rnnoise.git
cd rnnoise
git checkout 904a876dce1f9ab8860c0a5000ed151f9f6eef58
./autogen.sh
./configure
make

On Linux on make step I recieve a lot of

src/vec_avx.h:801:40: error: incompatible type for argument 1 of ‘mm256_broadcastd_epi32’                                        
  801 |          vxj = _mm256_broadcastd_epi32(_mm_loadu_si32(&x[*idx++]));                                                      
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                        
      |                                        |                                                                                 
      |                                        int                                                                               
src/vec_avx.h:204:59: note: in definition of macro ‘_mm256_broadcastd_epi32’  

And it ends up with

make: *** [Makefile:721: src/nnet.lo] Error 1

On Mac I recieve:

In file included from src/nnet.c:39:
In file included from ./src/vec.h:41:
./src/vec_neon.h:35:10: fatal error: 'os_support.h' file not found
#include "os_support.h"
         ^~~~~~~~~~~~~~
1 error generated.
make[1]: *** [src/nnet.lo] Error 1
make: *** [all] Error 2
@pallaswept
Copy link

pallaswept commented Apr 15, 2024

Once I got the dependencies installed (make, gcc, and friends, and glib2-devel), it all worked OK for me, on a tumbleweed live image VM. Perhaps there's some version or configuration difference, but hopefully this gives you a starting point that is known to work, which you can use to get your system to behave the same way. Good luck!

@grazder
Copy link
Author

grazder commented Apr 15, 2024

@pallaswept Do you have full list of dependencies?

@grazder
Copy link
Author

grazder commented Apr 15, 2024

Seems like ./configure should check everything, but it says that everithing is OK

------------------------------------------------------------------------
  rnnoise 0.2: Automatic configuration OK.

    Assertions ................... no

    Hidden visibility ............ yes

    API code examples ............ yes
    API documentation ............ yes
------------------------------------------------------------------------

@pallaswept
Copy link

@pallaswept Do you have full list of dependencies?

Starting with the live image, this will build it:

sudo zypper install --recommends git-core gcc make autoconf libtool glib2-devel
git clone https://github.com/xiph/rnnoise.git
cd rnnoise
git checkout 904a876dce1f9ab8860c0a5000ed151f9f6eef58
export CFLAGS=-march=native # Optional, but you will get lots of warnings without specifying a capable CPU
./autogen.sh
./configure
make

mklingb pushed a commit that referenced this issue Apr 16, 2024
vec_avx.h needs x86cpu.h, and x86cpu.h needs to detect SSE2 (or
 greater) without the Opus macros.
Also, nobody was defining OPUS_CLEAR (but several things were
 including the non-existent os_support.h where it is defined in
 libopus), so replace those calls with RNN_CLEAR and remove the
 erroneous includes.
Take the opportunity to hoist OPUS_GNUC_PREREQ to common.h, too,
 since it is needed in multiple places now.

Fixes GitHub #222
@2towardsnorth
Copy link

Can it be implemented on Windows

@jmvalin
Copy link
Member

jmvalin commented Apr 22, 2024

Normally the code should compile on Windows. That being said, there's no build system other than autotools at the moment

@pengzhendong
Copy link

Can it be implemented on Windows

Sure. https://github.com/pengzhendong/pyrnnoise/blob/master/CMakeLists.txt

@firmwarecostum
Copy link

firmwarecostum commented Jun 30, 2024

@grazder

fix 372f7b4

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

6 participants