HISE Logo Forum
    • Categories
    • Register
    • Login

    Recompile with -fPIC

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 1.2k 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:

        Link Preview Image
        "relocation R_X86_64_32S against " linking Error

        I'm Trying to Link a static Library to a shared library , I'm Getting the Following error /usr/bin/ld: ../../../libraries/log4cplus/liblog4cplus.a(fileappender.o): relocation R_X86_64_32S against `a

        favicon

        Stack Overflow (stackoverflow.com)

        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. "

            Link Preview Image
            libpthread.so.0: error adding symbols: DSO missing from command line

            When I'm compiling openvswitch-1.5.0, I've encountered the following compile error: gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wformat-sec...

            favicon

            Stack Overflow (stackoverflow.com)

            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

                Link Preview Image
                Linux dependency issue

                I'm getting this message when trying to build a VSTi now /usr/bin/ld: /home/dave/.vst//Sofia Woodwinds.a(BinaryData_ce4232d4.o): relocation R_X86_64_PC32 aga...

                favicon

                Forum (forum.hise.audio)

                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

                49

                Online

                1.7k

                Users

                11.7k

                Topics

                101.9k

                Posts