Code Monkey home page Code Monkey logo

Comments (19)

meshula avatar meshula commented on May 19, 2024 1

To get past the error you encountered, you'll need to replace the chunk that reads

#include <ogg/config_types.h>

with

#include <inttypes.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;
typedef uint32_t ogg_uint32_t;
typedef int64_t ogg_int64_t;

@ddiakopoulos, this issue is at the libnyquist end. Shall we add a UNIX chunk to ogg/os_types.h with the above patch?

from labsound.

meshula avatar meshula commented on May 19, 2024 1

@modulesio, I feel the glob, thanks for the suggestion :) I've copied your patch in. 5427ebf

Since your directory structure has changed, I couldn't spot a way to cherrypick the fix without adopting the modified directory structure...

@jkoutavas, I did add those files to the cmake script, perhaps your cmake cache didn't get regenerated?

Perhaps clean out your cmake build directory, and regenerate the cache using the latest patch from modulesio.

from labsound.

meshula avatar meshula commented on May 19, 2024

Thanks for the report. I haven't got a linux machine to test with, but I'll get the Mac target up again. PS, I have tested the make generator on Mac, I've been using the Xcode generator.

You mention you are running cmake at the root, however, I wrote the cmake with an out-of-source build in mind. eg, make a build directory as a sister to the LabSound directory, and cmake ../LabSound from within it. In any case, the clangdefaults file is as you say, missing....

from labsound.

meshula avatar meshula commented on May 19, 2024

I pushed cmake fixes that correct the erroneous MSVC flag settings you encountered, as well as the libvorbis issue. I didn't encounter the libogg issue on Mac, however, the CoreAudio framework isn't linked yet, so there's a bit more to do.

The Linux target hasn't been completed, although the RtAudio backend for Windows could be used as a first step in that direction.

from labsound.

meshula avatar meshula commented on May 19, 2024

The mac build succeeds now using cmake with the xcode generator.
@jkoutavas, could you try again and report a result?

from labsound.

avaer avatar avaer commented on May 19, 2024

FWIW the way I fixed this error was including libogg source and ran ./configure to generate that ogg/config_types.h.

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

With this morning's pull, I'm able to get 100% through compiling on Darwin using cmake/make, but did hit a linker error.

[100%] Linking CXX executable bin/example
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
Undefined symbols for architecture x86_64:
  "vtable for nqr::ModplugDecoder", referenced from:
      nqr::NyquistIO::BuildDecoderTable() in liblibnyquist.a(AudioDecoder.cpp.o)
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "_mlp_process", referenced from:
      _tonality_analysis in liblibopus.a(analysis.c.o)
  "_net", referenced from:
      _tonality_analysis in liblibopus.a(analysis.c.o)
  "_silk_A2NLSF", referenced from:
      _silk_A2NLSF_FLP in liblibopus.a(wrappers_FLP.c.o)
     (maybe you meant: _silk_A2NLSF_FLP)
  "_silk_NSQ", referenced from:
      _silk_NSQ_wrapper_FLP in liblibopus.a(wrappers_FLP.c.o)
     (maybe you meant: _silk_NSQ_wrapper_FLP)
  "_silk_NSQ_del_dec", referenced from:
      _silk_NSQ_wrapper_FLP in liblibopus.a(wrappers_FLP.c.o)
  "_silk_VAD_GetSA_Q8", referenced from:
      _silk_encode_do_VAD_FLP in liblibopus.a(encode_frame_FLP.c.o)
  "_silk_VAD_Init", referenced from:
      _silk_init_encoder in liblibopus.a(init_encoder.c.o)
  "_silk_biquad_alt", referenced from:
      _silk_LP_variable_cutoff in liblibopus.a(LP_variable_cutoff.c.o)
  "_silk_control_audio_bandwidth", referenced from:
      _silk_control_encoder in liblibopus.a(control_codec.c.o)
  "_silk_encode_pulses", referenced from:
      _silk_Encode in liblibopus.a(enc_API.c.o)
      _silk_encode_frame_FLP in liblibopus.a(encode_frame_FLP.c.o)
  "_silk_interpolate", referenced from:
      _silk_find_LPC_FLP in liblibopus.a(find_LPC_FLP.c.o)
  "_silk_process_NLSFs", referenced from:
      _silk_process_NLSFs_FLP in liblibopus.a(wrappers_FLP.c.o)
     (maybe you meant: _silk_process_NLSFs_FLP)
  "_silk_quant_LTP_gains", referenced from:
      _silk_quant_LTP_gains_FLP in liblibopus.a(wrappers_FLP.c.o)
     (maybe you meant: _silk_quant_LTP_gains_FLP)
  "_silk_resampler_down2", referenced from:
      _silk_pitch_analysis_core_FLP in liblibopus.a(pitch_analysis_core_FLP.c.o)
  "_silk_resampler_down2_3", referenced from:
      _silk_pitch_analysis_core_FLP in liblibopus.a(pitch_analysis_core_FLP.c.o)
  "_silk_stereo_find_predictor", referenced from:
      _silk_stereo_LR_to_MS in liblibopus.a(stereo_LR_to_MS.c.o)
  "_silk_stereo_quant_pred", referenced from:
      _silk_stereo_LR_to_MS in liblibopus.a(stereo_LR_to_MS.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/example] Error 1
make[1]: *** [CMakeFiles/example.dir/all] Error 2
make: *** [all] Error 2

from labsound.

avaer avatar avaer commented on May 19, 2024

I think the glob needed to be more generic: https://github.com/modulesio/LabSound/blob/586a4d7510ecbbd5671ce40b87c2f4d0b74847d7/labsound/cmake/libnyquist.cmake#L8

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

@meshula, I see you merged-in @modulesio's latest changes. This morning, I updated to that, wiped-out my build directory and ran cmake ../labsound; make on my macOS 10.12.16 system. Build got to 49% before failing:

[ 49%] Building CXX object CMakeFiles/libnyquist.dir/third_party/libnyquist/src/ModplugDependencies.cpp.o
In file included from /Users/jay/dev/repos/oppop/labsound/third_party/libnyquist/src/ModplugDependencies.cpp:91:
/Users/jay/dev/repos/oppop/labsound/third_party/libnyquist/third_party/libmodplug/src/fastmix.cpp:678:2: error: 
      ISO C++1z does not allow 'register' storage class specifier [-Wregister]
        SNDMIX_BEGINSAMPLELOOP8

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

I'd like to humbly suggest that the CI test for passing a Mac build should include a cmake/make build too (not just a cmake/xcodebuild)

And of course, when things are working, add a linux cmake/make build to the CI too.

from labsound.

meshula avatar meshula commented on May 19, 2024

@jkoutavas Good suggestion on testing with cmake/make. the 'register' issue you're running into tells me that you are running an up to date tool chain on mac, which I don't have here, and can't upgrade quickly.

Would you mind attempting a fix? I believe that if you add the following


#ifdef __clang__
#pragma clang diagnostic ignored "-Wdeprecated-register"
#endif

to

libniyquist/third_party/libmodplug/src/stdafx.h

you'll get past the issue you have reported. If this works, we can patch it in.

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

you'll get past the issue you have reported. If this works, we can patch it in.

Alas, it did not make a difference.

I wonder if the solution is to have it build specifically for C++11?

from labsound.

meshula avatar meshula commented on May 19, 2024

That would be fine, I think, if it works.

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

That would be fine, I think, if it works.

I'll take a stab at that, and hopefully open a PR for it.

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

Okay, I lowered the bar to C++11, see 26144eb that helped. It's a commit on my open PR #71. The

#ifdef __clang__
#pragma clang diagnostic ignored "-Wdeprecated-register"
#endif

is not needed now.

Now we're at 61%...:

[ 61%] Building CXX object CMakeFiles/libnyquist.dir/third_party/libnyquist/third_party/libmodplug/src/load_abc.cpp.o
/Users/jay/dev/repos/oppop/LabSound/third_party/libnyquist/third_party/libmodplug/src/load_abc.cpp:260:13: error: static declaration of 'setenv' follows
      non-static declaration
static void setenv(const char *name, const char *value, int overwrite)

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

Yay! With the latest commit, 49e0d79, macOS cmake/make builds to 100%. Nice work!

from labsound.

jkoutavas avatar jkoutavas commented on May 19, 2024

Linux build, with latest commit is at 13%:

[ 13%] Building C object CMakeFiles/libopus.dir/third_party/libnyquist/third_party/opus/opusfile/src/http.c.o
In file included from /home/centos/LabSound/third_party/libnyquist/third_party/libogg/include/ogg/ogg.h:25:0,
                 from /home/centos/LabSound/third_party/libnyquist/third_party/opus/opusfile/include/opusfile.h:109,
                 from /home/centos/LabSound/third_party/libnyquist/third_party/opus/opusfile/src/include/internal.h:32,
                 from /home/centos/LabSound/third_party/libnyquist/third_party/opus/opusfile/src/http.c:16:
/home/centos/LabSound/third_party/libnyquist/third_party/libogg/include/ogg/os_types.h:143:32: fatal error: ogg/config_types.h: No such file or directory
 #  include <ogg/config_types.h>

from labsound.

meshula avatar meshula commented on May 19, 2024

Earlier, @modulesio reported this fix, but I haven't had time to look into it further:

FWIW the way I fixed this error was including libogg source and ran ./configure to generate that ogg/config_types.h.

Maybe this needs to be an additional step in the cmake script.

from labsound.

meshula avatar meshula commented on May 19, 2024

Closing this, as cmake works now for macos reliably via xcode or make, CI is showing green. Feel free to open a new issue to add a cmake/make build for CI.

from labsound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.