Skip to content

Missing Libiberty on Mac OS X #23

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

Closed
hellgheast opened this issue Aug 5, 2019 · 10 comments
Closed

Missing Libiberty on Mac OS X #23

hellgheast opened this issue Aug 5, 2019 · 10 comments

Comments

@hellgheast
Copy link

I would like to know if there's any alternative to libiberty on Mac OS X as i'm unable to compile orbuculum since clang and macport gcc-7 don't have the libiberty library.

@mubes
Copy link
Collaborator

mubes commented Aug 5, 2019 via email

@UweBonnes
Copy link

As posted on gitter, on OpenSuse <demangle.h> is the right include:

locate demangle.h
...
/usr/include/demangle.h
rpm -qf /usr/include/demangle.h
binutils-devel-2.31-lp150.5.3.1.x86_64

@mubes
Copy link
Collaborator

mubes commented Aug 13, 2019

OK, thanks Uwe. Fix pushed for the OpenSuse case...perhaps that also fixes the issue for OSX. Waiting for feedback but will close this in a week if I don't hear further.

@hellgheast
Copy link
Author

Hello,
I tried to compile binutils and other libs that should have libiberty but it doesn't seem to work.
to resume at the moment there's no known fix.
One way would be to compile gcc-7 from scratch,but i didn't complete the compilation at the moment.

@hardkrash
Copy link

Would the LLVM version work?
https://llvm.org/doxygen/Demangle_8h_source.html

@akohlsmith
Copy link

I have this working in OSX by using binutils from homebrew, building from source and editing the recipe to include --enable-install-libiberty to the configure options. I then added the homebrew install paths to LDFLAGS and INCLUDE_PATHS in the Makefile.

The last bit, elf.h, I succeeded by changing #include <elf.h> to #include "elf.h" and putting the elf.h from the arm-none-eabi toolchain into the Orbuculum Src directory.

@Gasman2014
Copy link

Gasman2014 commented Jul 31, 2020

Thanks @akohlsmith that has helped.

i get the following error

Src/orbuculum.c:1567:16: error: use of undeclared identifier 'flags'
if ( ( flags = fcntl( f, F_GETFL, NULL ) ) < 0 )

and i can still only build orbuculum on macOS if I comment out the section (1555).

    // #ifdef OSX
    //         /* Remove the O_NONBLOCK flag now the port is open (OSX Only) */

    //         if ( ( flags = fcntl( f, F_GETFL, NULL ) ) < 0 )
    //         {
    //             genericsExit( -3, "F_GETFL failed" EOL );
    //         }

    //         flags &= ~O_NONBLOCK;

    //         if ( ( flags = fcntl( f, F_SETFL, flags ) ) < 0 )
    //         {
    //             genericsExit( -3, "F_SETFL failed" EOL );
    //         }

    // #endif

orbit still won't build as it complains about missing demangle.h which still doesn't appear to have been installed.

@akohlsmith
Copy link

Oh yes, just add int flags, I forgot about that. I have a PR I need to create which fixes the build on OSX.

@mubes
Copy link
Collaborator

mubes commented Sep 10, 2020

@akohlsmith Andrew, do you have an patch for this so we can close it off?

@mubes
Copy link
Collaborator

mubes commented Nov 5, 2020

As at 9f6a8e9 OSX building is folded back into main. Thanks a million for this @akohlsmith

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants