how about a 'snowleopardfixes' library port?

Ken Cunningham ken.cunningham.webuse at gmail.com
Tue Aug 23 10:00:05 PDT 2016


> 
> Maybe, if you can make a dylib out of it.
> 


Hmmm. Making the dylib wasn't too hard:

clang -dynamiclib -std=gnu99 strnlen.c getline.c -current_version 1.0 -compatibility_version 1.0 -o libsnowleopardfixes.a.dylib

and setting it up seems equally straightforward:

sudo cp ./libsnowleopardfixes.a.dylib /opt/local/lib/libsnowleopardfixes.a.dylib
sudo ln -s /opt/local/lib/libsnowleopardfixes.a.dylib /opt/local/lib/libsnowleopardfixes.dylib

but something a bit odd happens during the configure phase of lnav. With the static library, it all went fine through to the build. But with the dyllib, all goes well and the dylib seems to be found (and basically ignored) until I get this funny error during the check when configure checks for "cross compiling"...

Open to your thoughts - perhaps configure needs libsnowleopardfixes to be a universal dylib to function during this phase?

Easy enough to try. I don't exactly know what configure is checking for during the cross-compile stage of testing....

Ken



--- lnav configure.log part ----
configure:3484: $? = 1
configure:3504: checking whether the C++ compiler works
configure:3526: /opt/local/bin/clang++-mp-3.7 -pipe -Os -arch x86_64 -stdlib=libc++ -I/opt/local/include -I/opt/local/include -I/usr/local/include -I/usr/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -stdlib=libc++ -lsnowleopardfixes.a -L/opt/local/lib -L/usr/local/lib -L/usr/lib conftest.cpp  >&5
configure:3530: $? = 0
configure:3578: result: yes
configure:3581: checking for C++ compiler default output file name
configure:3583: result: a.out
configure:3589: checking for suffix of executables
configure:3596: /opt/local/bin/clang++-mp-3.7 -o conftest -pipe -Os -arch x86_64 -stdlib=libc++ -I/opt/local/include -I/opt/local/include -I/usr/local/include -I/usr/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -stdlib=libc++ -lsnowleopardfixes.a -L/opt/local/lib -L/usr/local/lib -L/usr/lib conftest.cpp  >&5
configure:3600: $? = 0
configure:3622: result: 
configure:3644: checking whether we are cross compiling
configure:3652: /opt/local/bin/clang++-mp-3.7 -o conftest -pipe -Os -arch x86_64 -stdlib=libc++ -I/opt/local/include -I/opt/local/include -I/usr/local/include -I/usr/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -stdlib=libc++ -lsnowleopardfixes.a -L/opt/local/lib -L/usr/local/lib -L/usr/lib conftest.cpp  >&5
configure:3656: $? = 0
configure:3663: ./conftest
dyld: Library not loaded: libsnowleopardfixes.a.dylib
  Referenced from: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_lnav/lnav/work/lnav-0.8.1/./conftest
  Reason: image not found
./configure: line 3665: 50401 Trace/BPT trap          ./conftest$ac_cv_exeext
configure:3667: $? = 133
configure:3674: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_sysutils_lnav/lnav/work/lnav-0.8.1':
configure:3676: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.

------ 


More information about the macports-dev mailing list