Bug #71

Python shared library version mismatch

Added by Pat Pannuto over 7 years ago. Updated over 7 years ago.

Python API
Start date:
Due date:
% Done:



(On OS X)

When importing the Python library, I get
OSError: dlopen(/Volumes/code/berkeley/gdp/lang/python/gdp/../../../gdp/, 6): image not found

I fixed this by going to that gdp folder and simply
ln -s

And the library seems to be working. It could be just a version number bump that got missed somewhere, but I didn't want to push changes in case there's anything more complex.


#1 Updated by Eric Allman over 7 years ago

  • Category set to Python API
  • Assignee set to Nitesh Mor

#2 Updated by Anonymous over 7 years ago

I may have fixed this, but Nitesh should confirm.

#3 Updated by Nitesh Mor over 7 years ago

  • Status changed from New to Closed

Yepp, seems to have been fixed in commit:152bd9. Thanks Christopher.

#4 Updated by Pat Pannuto over 7 years ago

Nitesh Mor wrote:

Yepp, seems to have been fixed in commit:152bd9. Thanks Christopher.

Awesome, thanks.

I noticed that you included directions pointing to macports. I might suggest that you consider pointing people to Homebrew ( ) instead. Macports is kinda dying as a project, it doesn't have a lot of new packages nor are existing ones updating anymore and it delivers a far inferior user experience compared to brew.

#5 Updated by Eric Allman over 7 years ago

As near as I can tell, homebrew versus macports is kind of a toss-up, since neither supersets the other. In particular, macports doesn't support mosquitto, but homebrew doesn't support Avahi — and mosquitto is easier to install by hand than Avahi, at least the last time I checked. In any case, we can't just "pick one", since they conflict — we have to use whatever is already installed on the system, which is exactly what we do now.

#6 Updated by Anonymous over 7 years ago

It is possible to build without avahi by using "make all_noavahi". Mosquitto is not typically required at runtime, or at least I have not knowingly needed it.

I tried brew and it would have required updating the Makefile for OpenSSL, so I reverted to Mac Port.

Below is an email thread that discusses the details

Eric wrote:

Is there some reason the Apple version doesn't work?  I'm reluctant to keep adding "stuff" to Makefiles that makes them ever more obscure.

Another alternative: move the stuff in /usr/local/opt/openssl (which is a very odd path) into /usr/local or /opt/local.

Yet another alternative: switch to macports, which seems to work /much/ better than brew (brew has plagued me since this project started).

A fourth alternative: arrange to compile with LOCAL1 or LOCAL2 set to the OPENSSL location.

A fifth alternative: update adm/ (and add a similar adm/ script) to focus all the crap in one place (which also affords more flexibility).

A sixth alternative: I hold my nose and switch to gmake, which can (unfortunately) do most everything.  So far I've managed to keep things simple enough to avoid gnu-isms but I can see the writing on the wall sometime all too soon.  This would make it possible to put all the common stuff in one master Makefile, which would probably make me feel better about it.  That will take more time though.

If none of these can possibly work for you then I could be talked into (very reluctantly) going along.  I might lean toward calling it LOCAL3 instead of OPENSSL, although I might feel differently in the morning.  And you would need to do all the Makefiles, not just gdp/Makefile.  I'll just turn the music on loud and try to miss the commit going by.


On 2016-09-01 4:58 PM, Christopher Brooks wrote:
> Eric,
> On the Mac, if if openssl is installed with brew, then the following message appears:
>     Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
>     Generally there are no consequences of this for you. If you build your
>     own software and it requires this formula, you'll need to add to your
>     build variables:
>         LDFLAGS:  -L/usr/local/opt/openssl/lib
>         CPPFLAGS: -I/usr/local/opt/openssl/include
> This means that I had to make a changes to the Makefiles like:
>     diff --git a/gdp/Makefile b/gdp/Makefile
>     index d3e7d58..7347059 100644
>     --- a/gdp/Makefile
>     +++ b/gdp/Makefile
>     @@ -36,6 +36,7 @@ DESTDIR=
>      LOCALROOT=     /usr
>      LOCAL1=                /usr/local
>      LOCAL2=                /opt/local
>     +OPENSSL=       /usr/local/opt/openssl
>      # These generally do not need to be changed
>     @@ -129,7 +130,8 @@ INCROOT=    ..
>      INCSEARCH=     ${INCLOCAL} \
>                     -I${INCROOT} \
>                     -I${LOCAL1}/include \
>     -               -I${LOCAL2}/include
>     +               -I${LOCAL2}/include \
>     +               -I${OPENSSL}/include
>      LIBROOT=       ${INCROOT}
>      LIBCRYPTO=     -lcrypto
>      LIBEVENT2=     -levent -levent_pthreads
>     @@ -140,7 +142,8 @@ INCS=               ${INCSEARCH} ${INCEP} ${INCEVENT2} ${INCAVAHI}
>      LIBSEARCH=     ${LIBLOCAL} \
>                     -L${LIBROOT}/ep \
>                     -L${LOCAL1}/lib \
>     -               -L${LOCAL2}/lib
>     +               -L${LOCAL2}/lib \
>     +               -L${OPENSSL}/lib
>      LDFLAGS=       ${LIBSEARCH}
>      LDLIBS=                ${LIBEP} \
>                     ${LIBEVENT2} \
> Can I go ahead and check in these changes?
> Thanks,
> _Christopher

Also available in: Atom PDF