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

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

Open
muziker opened this issue Jan 8, 2020 · 7 comments
Open

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

muziker opened this issue Jan 8, 2020 · 7 comments

Comments

@muziker
Copy link

muziker commented Jan 8, 2020

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
Copy link
Author

muziker commented Jan 8, 2020

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.

@grrrr
Copy link
Owner

grrrr commented Jan 10, 2020

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

@muziker
Copy link
Author

muziker commented Jan 13, 2020

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
Copy link
Author

muziker commented Jan 13, 2020

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
Copy link
Author

muziker commented Jan 14, 2020

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
Copy link
Author

muziker commented Jan 15, 2020

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
Copy link
Author

muziker commented Jan 16, 2020

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?

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

2 participants