Author Topic: arch flags  (Read 2566 times)

Vampire

  • Newbie
  • *
  • Posts: 11
    • View Profile
arch flags
« on: March 17, 2016, 15:14:18 »
Hi,

I keep finding I get either

Undefined symbols for architecture i386

or

Undefined symbols for architecture x86_64

If I compile for x86_64, I can't test in vamp-plugin-tetser (it is 32 bit). But


when I do make -f Makefile.osx (is this still right?)
I get
6 warnings generated.
c++ -mmacosx-version-min=10.9 -arch i386 -stdlib=libc++ -Wall -Wextra -g -fPIC -I. -I../vamp-plugin-sdk    -c -o plugins.o plugins.cpp
c++ -o PreciseOnsetDetector.dylib PreciseOnsetDetector.o plugins.o -mmacosx-version-min=10.9 -arch i386 -stdlib=libc++   -dynamiclib -exported_symbols_list vamp-plugin.list ../vamp-plugin-sdk/libvamp-sdk.a
ld: warning: ignoring file ../vamp-plugin-sdk/libvamp-sdk.a, file was built for archive which is not the architecture being linked (i386): ../vamp-plugin-sdk/libvamp-sdk.a


so I'm a bit confused. Happy to just make a 32 bit version if that's what works.


any tips on compiling against one of these? Is the tutorial still working? Is nice and straight-forward but I don't get a compiled plugin from it yet.

thanks

cannam

  • Administrator
  • Sr. Member
  • *****
  • Posts: 273
    • View Profile
Re: arch flags
« Reply #1 on: March 17, 2016, 15:23:32 »
Hi there -- thanks for posting. My immediate response was "hang on, surely the Vamp plugin tester is 64-bit by now". It turns out that although I had uploaded a 64-bit OSX build of it, I hadn't updated the Vamp website to link to it!

So the download available at https://code.soundsoftware.ac.uk/projects/vamp-plugin-tester/files is 64-bit, but the links from http://vamp-plugins.org/develop.html are still to the old ones. I'll fix that right away, sorry about that.

It is definitely recommended to make 64-bit plugins these days. The command line you listed looks like it should work if the arch is x86_64; does it?


Chris

Vampire

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: arch flags
« Reply #2 on: March 17, 2016, 15:39:14 »
hi Chris

thanks. So I redid the tutorial

changing this line in build/Makefile.osx

to be BOTH architectures

ARCHFLAGS ?= -mmacosx-version-min=$(MINVERSION) -arch i386 -arch x86_64 -stdlib=libc++

(not just x86_64) which may have been the problem (?)


Now it seems I have built a .dylib.


1.
file structure-wise, do I have a folder with

vamp-plugin-sdk on the same level as my

my-skeleton-tutorial-plugin ?


2. a simple 'make' is unhappy
(Undefined symbols for architecture x86_64:)

whereas
make -f Makefile.osx is okay (compiles just i386 perhaps)

I still need to work out what I'm doing architecture-wise

thanks!





Vampire

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: arch flags
« Reply #3 on: March 17, 2016, 15:45:08 »
it's looking like

if you add in both architectures to the build/Makefile.osx

you can successfully build both i386 and x86_64

I had a typo

but the compilation of the sdk and plugins (make -f build/Makefile.osx plugins) will presumably have to be for both architectures for this to work?


I now have some warning, unused parameters and empty identifiers


one thing - why does a simple 'make' not work?

Vampire

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: arch flags
« Reply #4 on: March 17, 2016, 18:02:22 »
as a note for future, I found that for vamp-simple-host (32bit), it's necessary to install

libsndfile

brew install libogg
brew install libvorbis
brew install flac


so that it could read the file formats