py icon indicating copy to clipboard operation
py copied to clipboard

Cannot compile py to use flext ( recompile to use -fPIC)

Open muziker opened this issue 5 years ago • 7 comments

In flext, i specified CXXFLAGS & CPPFLAGS = "-fPIC" make and compiled flext. The compilation completes and the scrolling logs have "-fPIC -DPIC".

In py, when compiling, i get this error message about flext.

symbol `_ZTV11TableAnyMap' can not be used when making a shared object; recompile with -fPIC

How do i resolve this issue?

muziker avatar Jan 08 '20 07:01 muziker

it's for linux. Flext and py are from the repository. it could be it's trying to link against a static library vs a .so lib.

muziker avatar Jan 08 '20 08:01 muziker

Hi, i can't reproduce this behavior when using the flext build system (build.sh script). By which means have you tried the compilation?

grrrr avatar Jan 10 '20 12:01 grrrr

i'm using: in the py directory, do ../flext/build.sh pd gcc build . I've defined the PKG_CONFIG_PATH= , where flext is installed not in the standard places where ld can find it. The build script doesn't seem to use the pkg-config to generate the correct path to find pd-flext, or rather the correct invocations are not distributed to the rest of the build steps. When run the particular g++ line to build py on the commandline, and specify the correct -I -L, i get the errors above.

It's probably just an incorrect invocation at this linking stage - something with how the library is being linked. How are you doing it? BTW my git describe --tag is v0-2-2-14-g6d47a22

muziker avatar Jan 13 '20 08:01 muziker

I think the buildsys/lnx/*.def files don't take into account the PREFIX path or the path to the specified pd source or local flext installation or where py is supposed to be installed ( INSTPATH )

muziker avatar Jan 13 '20 08:01 muziker

I've managed to compile this v0-2-2-14-g6d47a22 version, by explicitly including the -I -L flags for the particular flext install that i have. But during runtime i'm getting this : undefined symbol: _ZTI16flext_base_multi

I've changed the runpath of the py.pd_linux to point to the directory of the new flext install, and i've trawled the older libflext for this particular symbol but it isn't there. Is this a multiarch thing? What libflext should i be using?

muziker avatar Jan 14 '20 04:01 muziker

I managed to solve the flext_base_multi problem by ( i did not revert changes to double check ):

  1. changing the flext/buildsys/lnx/pd/config-gcc.dev to point to the relevant pure data sources, install path
  2. removing all of this particular flext
  3. rebuild, reinstall with --enable-static --enable-shared explicitly defined
  4. for flext: the build.sh pd gcc build . yields this error at first ------------------------------------------------------------------------- A default package configuration file has been created. Please edit config.txt, then start again. ------------------------------------------------------------------------- make: *** [buildsys/gnumake.mak:121: config.txt] Error 1
  5. But a subsequent ./build.sh pd gcc build results in a successful compile of flext
  6. From the py directory, ../flext/build.sh pd gcc build & install
  7. from pure data [ py ] and it worked

I guess the question now is how to run the python scripts

muziker avatar Jan 15 '20 05:01 muziker

Running the [py ] scripts sometimes segfaults. Also is pyext wheel supposed to be built together with this project? Because i cannot find it. Is there documentation on how to get this working?

muziker avatar Jan 16 '20 07:01 muziker