HISE Logo Forum
    • Categories
    • Register
    • Login

    Recompile with -fPIC

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by

      Any idea how to solve this error? it happens at the linking stage. I tried setting the flag in the JUCE file but it made no difference so I assume it is something else that needs to be compiled with the flag set.

      /usr/bin/ld: build/Sofia Woodwinds.a(BinaryData_ce4232d4.o): relocation R_X86_64_PC32 against symbol `_ZN10BinaryData13infoError_pngE' can not be used when making a shared object; recompile with -fPIC
      /usr/bin/ld: final link failed: Bad value
      collect2: error: ld returned 1 exit status
      make: *** [build/Sofia Woodwinds.so] Error 1
      Compiling finished. Cleaning up...
      

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff
        last edited by

        I saw this link:

        https://stackoverflow.com/questions/19768267/relocation-r-x86-64-32s-against-linking-error

        It shows how to check if your static library was compiled with -fPIC

        Dan Korneff - Producer / Mixer / Audio Nerd

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          Well I did make clean and resaved the jucer file and magically that issue vanished!

          Now I'm getting this when compiling the standalone

          /usr/bin/ld: build/intermediate/Release/include_juce_gui_basics_e3f79785.o: undefined reference to symbol 'XShmGetEventBase'
          //usr/lib/x86_64-linux-gnu/libXext.so.6: error adding symbols: DSO missing from command line
          collect2: error: ld returned 1 exit status
          make: *** [build/Sofia Woodwinds] Error 1
          

          Any ideas? I've reinstalled libxext-dev and libx11-dev just in case but it made no difference.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff
            last edited by

            This might help?

            "You should mention the library on the command line after the object files being compiled.
            Explanation: the linking is dependent on the order of modules. Symbols are first requested, and then linked in from a library that has them. So you have to specify modules that use libraries first, and libraries after them. "

            https://stackoverflow.com/questions/19901934/libpthread-so-0-error-adding-symbols-dso-missing-from-command-line

            Dan Korneff - Producer / Mixer / Audio Nerd

            d.healeyD 1 Reply Last reply Reply Quote 1
            • d.healeyD
              d.healey @Dan Korneff
              last edited by

              @dustbro Yeah I saw that too. I'm using the auto-generated files from HISE but looks like I might have to start tinkering with them to see if I can get it to work.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              1 Reply Last reply Reply Quote 1
              • d.healeyD
                d.healey
                last edited by

                Turns out I had this fPIC issue before and forgot about it, also explains the solution

                https://forum.hise.audio/topic/940/linux-dependency-issue/23

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                5

                Online

                1.8k

                Users

                11.9k

                Topics

                103.7k

                Posts