taviso / ctypes.sh

A foreign function interface for bash.
MIT License
2.09k stars 92 forks source link

problems w/ .config for getting ctypes for shell compiled #29

Closed RogerWeihrauch closed 8 years ago

RogerWeihrauch commented 8 years ago

Howdy colleagues

1st: thanx very much or this amazing ideas to have shells executing c-like commands due out of this incredible feature I am trying actually to get the sources compiled on OSX for using those extension in bash. I want use ctypes in OSX bash installed w/ brew in version: | => bash -version GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin14.5.0) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html When I do .config the following error on terminal appears:

configure: error: in /Users/RogiWanKenobi/ctypes.sh': configure: error: unable to build a test extension Seeconfig.log' for more details

And the mentioned log file shows: conftest.c:11:10: fatal error: 'ac_nonexistent.h' file not found

include

     ^

1 error generated. configure:7590: $? = 1 configure: failed program was: | /* confdefs.h */

So, how do I get the sources for ctypes.sh compiled correctly?

Any hint is highly appreciated.

Thanks in advance, Roger

taviso commented 8 years ago

Hi Roger, I'm not sure it will work on OSX because of the way Apple compile bash. IIRC, they don't export dynamic symbols - this is a common mistake, because not many people use bash plugins, so the bug doesn't get noticed.

RogerWeihrauch commented 8 years ago

Howdy taviso

What does it mean tome that this bug does not get noticed? On your hint I was investigating my issue: Since I am working with a brew env on osx I checked using the following nly in my brew env:

So what I found in the configure log was the following: configure:7517: $? = 0 configure:7531: gcc -E conftest.c conftest.c:11:10: fatal error: 'ac_nonexistent.h' file not found

include

     ^

1 error generated. configure:7531: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "ctypes.sh"

So, to me it seems there is a kind of '.h' file missing.

What do you think?

Regards, Roger

RogerWeihrauch commented 8 years ago

Sorry, I touched the wrong button; in my eyes it is not to be seen as closed.

So, reopened it.

Regards, Roger

taviso commented 8 years ago

I think there is not much we can do about this until Apple fix their bash build. I verified on an El Capitan installation that no symbols are available, which means you can load a plugin but you can't do anything useful with it.