I have been desperately trying to build MacVim against a custom Python framework with no luck so far. I have tried many things, at the end MacVim builds with no errors, but when I check the linking of the final binary, it always lists as being linked against the default OSX Python.Framework, which is not something that I want.
Here is my configure command:
./configure --prefix=/Users/me/apps/Darwin64/macvim-7.4.258-clang-500.2.79\
--with-features=huge \
--enable-rubyinterp=yes \
--enable-perlinterp=yes \
--enable-cscope \
--enable-pythoninterp=yes \
--with-python-config-dir=/Users/me/apps/Darwin64/python2.7/lib/python2.7/config \
--enable-luainterp=yes \
--with-lua-prefix=/Users/me/apps/Darwin64/lua-5.2.3-clang-500.2
I have every possible environment variable out there set to point to the correct python folder ($PYTHONPATH, $PYTHONHOME etc.) My custom Python build is solid and healthy, I have never had issues with it.
Analysing the configure and build logs, I can see that the build process is finding my custom Python2.7 every time it performs some kind of a check:
(from the build log)
-I/Users/me/apps/Darwin64/python2.7.6-clang-500.2.79/include/python2.7 -DPYTHON_HOME='"/Users/me/apps/Darwin64/python2.7.6-clang-500.2.79"'
(from the config log)
configure:5792: found /Users/me/apps/Darwin64/bin/python
...
configure:5837: checking Python's install prefix
configure:5846: result: /Users/me/apps/Darwin64/python2.7.6-clang-500.2.79
...
configure:6014: checking if compile and link flags for Python are sane
configure:6031: gcc -o conftest -g -O2 -I/Users/me/apps/Darwin64/python2.7.6-clang-500.2.79/include/python2.7 -DPYTHON_HOME='"/Users/me/apps/Darwin64/python2.7.6-clang-500.2.79"' -DMACOS_X_UNIX conftest.c -framework Python >&5
configure:6031: $? = 0
configure:6032: result: yes
...
So despite the fact that it is all properly set, the resulting MacVim.app is always built against the default Python.Framework:
$ otool -L ./MacVim.app/Contents/MacOS/Vim | grep "Python"
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.5)
I am suspecting (at least this is what I have seen on some other discussion groups) that the Python linking is hardcoded somewhere despite the fact that the checks are going through with no issues.
Could you please help me with this? Other bits and pieces in my pipeline compiles fine against my custom python, but things are breaking for me when MacVim is not using the Python framework every other package is using. For example YouCompleteMe will compile fine using my custom Python but the MacVim will start crashing because of this Python framework discrepancy.
Thank you very much!
Related
I am learning Use the NDK with other build systems. Trying to get the example for Autoconf to work. It looks like ./configure --host $TARGET is working as expected. But I get an error while executing make:
arm/filter_neon.S -fPIC -DPIC -o arm/.libs/filter_neon.o
arm/filter_neon.S:24:17: error: expected string in directive
.section __LLVM,__asm
^
make[1]: *** [Makefile:1187: arm/filter_neon.lo] Error 1
I am new to Android and Linux. Here is the .sh-file I am using on Ubuntu:
#!/bin/bash -v
# Check out the source.
git clone https://github.com/glennrp/libpng
cd libpng
# Only choose one of these, depending on your build machine...
#export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
# Only choose one of these, depending on your device...
#export TARGET=aarch64-linux-android
export TARGET=armv7a-linux-androideabi
#export TARGET=i686-linux-android
#export TARGET=x86_64-linux-android
# Set this to your minSdkVersion.
export API=21
# Configure and build.
export AR=$TOOLCHAIN/bin/$TARGET-ar
export AS=$TOOLCHAIN/bin/$TARGET-as
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
export LD=$TOOLCHAIN/bin/$TARGET-ld
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
export STRIP=$TOOLCHAIN/bin/$TARGET-strip
./configure --host $TARGET
make
What am I doing wrong, why the tutorial example doesn't work? Thank you in advance.
There are bug in libpng. Do not use cloning from github. Use released version. There are different link on github https://github.com/glennrp/libpng/releases/tag/v1.6.35
Change this script from official doc and do not clone github repo, just download archive and run this script inside of it.
For me all is working.
Hm. This is my fault :)
I added this to support bitcode enabled builds with non-Apple LLVM. It works there but not on Android. Using the release as suggested by #Alexandr Kirilov is a good call, but this should be fixed upstream in libpng as well.
It needs to be guarded by __APPLE__ as well, see https://github.com/glennrp/libpng/pull/383
Unfortunately, when I patched this I only tested it on macOS/iOS platforms and not on other arm platforms :(
I have an issue with Codelite compilation, running on raspbian jessie - these are the (known) steps I have taken to produce it.
First I installed Codelite with apt-get install Codelite, then produced a c++ project.
When running build project I get the error:
/bin/sh -c ' -j 4 -e -f Makefile'
/bin/sh: 1: -j: not found
0 errors, 0 warnings
I note that this error has been found and corrected previously, through running a different version of Codelite from 6.1.1 (that which apt-get installs). I therefore found the updated version of armhf .deb codelite from the rasbian archive with gdebi-gtk. However the updated version (9.1.1) produces the following error (install attempt with the graphical debian):
Error: Dependency is not satisfiable: libclang 1-3.8 (>=3.2)
I do not understand why the package manager cannot update these packages - do they not exist for the pi? I ran the manager as root, so I do not think it is a permissions issue.
EDIT 1:
Thank you for that Fabre. My Enviromental Variables file now looks like this:
CodeLiteDir=/usr/share/codelite
export MAKE=make
I still get the same error however.
Preface: I am new to OCaml, OPAM, and OASIS.
tldr question: How do I properly set up a package with opam that is not already available in the repository (I can't just do opam install X)? More details follow:
I am trying to include ocaml-glpk in an OCaml project. I installed ocaml-glpk just by running make and make install as stated in the README, and the given example compiles and runs correctly. However, I am using OASIS to generate the build system of my project, and I am not sure how to set it up. I have the same example (renamed to glpkExample.ml in a src folder) and the following in my _oasis file:
Executable "glpkExample"
Path: src
MainIs: glpkExample.ml
CompiledObject: best
BuildDepends:
glpk
After running oasis setup -setup-update dynamic, I run make and get the following error:
ocaml setup.ml -build
Finished, 0 targets (0 cached) in 00:00:00.
+ /home/dimitrios/.opam/system/bin/ocamlfind ocamlopt -g -linkpkg -package glpk src/glpkExample.cmx -o src/glpkExample.native
File "_none_", line 1:
Error: Cannot find file /home/dimitrios/.opam/system/lib/glpk/glpk.cmxa
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
E: Failure("Command ''/usr/bin/ocamlbuild' src/glpkExample.native -tag debug' terminated with error code 10")
make: *** [build] Error 1
It seems the glpk library is missing a cmxa file needed to compile a native executable. I am not sure how to fix this. To compile glpkExample.ml correctly, my Makefile includes /home/dimitrios/.opam/system/lib/glpk and also uses the OCamlMakefile, which is extremely long and convoluted. Any help on setting this up with OASIS or how to get ocaml-glpk to work nicely with OASIS would be greatly appreciated.
Thanks!
This website is not appropriate for bug reports. You should really report it here.
The temporary solution is to use CompiledObject: byte to compile in bytecode.
If you're using opam then it is best to install application with it, not manually. Try to clean up your system and remove whatever you installed, and then do:
$ eval `opam config env`
$ opam install ocaml-glpk
Afterwards, if glpk is packaged in opam correctly, it should work with your setup, i.e., just with oasis's BuildDepends field and nothing more.
I try to compile an Ocaml project with an Ocaml version provided by Opam.
My ocamlbuild, ocamlfind, and oasis seem OK :
/Users/fred/.opam/4.02.1/bin/ocamlbuild
dhcp-182-73:compil fred$ which ocamlfind
/Users/fred/.opam/4.02.1/bin/ocamlfind
dhcp-182-73:compil fred$ which oasis
/Users/fred/.opam/4.02.1/bin/oasis
But when I try to compile, it seems that a wrong version of ocamlbuild is called, and even the version of ocamlfind is right, I think that it explains why ocamlfind can't find the sexplib library.
$ make
ocaml setup.ml -build
Finished, 0 targets (0 cached) in 00:00:00.
+ /Users/fred/.opam/system/bin/ocamlfind ocamldep -package threads -package sexplib.syntax -package core -package comparelib.syntax -modules src/tricot/tricot.mli > src/tricot/tricot.mli.depends
ocamlfind: Package `sexplib.syntax' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
E: Failure("Command ''/usr/local/bin/ocamlbuild' src/tricot/tricot.cma src/tricot/tricot.cmxa src/tricot/tricot.a src/tricot/tricot.cmxs src/compil/compil.cma src/compil/compil.cmxa src/compil/compil.a src/compil/compil.cmxs src/main.native -use-ocamlfind -tag debug' terminated with error code 10")
make: *** [build] Error 1
I've tried to tell oasis which version of ocambuild to use without success, does someone knows how it could be done ?
Thanks
Try deleting setup.data and running make again. Oasis caches the paths the first time you try to build, and doesn't update them automatically afterwards. Perhaps you tried to build it, then used opam switch, then tried to build it again?
You must be missing a
eval $(opam config env)
See the documentation of opam switch.
Note that normally opam's install procedure should have made so that this gets invoked automatically on new shells. You may want to run opam init again it will prompt you to agree to make changes to your .profile so that everything is in order when you start new shells.
EDIT: In fact it looks like you changed to the system switch between the two invocations you show us. So it seems that in the system switch sexp is not installed. In anycase whenever you opam switch in a shell always invoke the command I mentioned above so that the right paths are setup.
In addition to Thomas's answer, you can discard the configuration by
ocaml setup.ml -distclean
I'm trying to compile protobuf 3.0.0 alpha 1 on Windows using MinGW 4.9.2 & MSYS.
According to the instructions I'm supposed to:
./configure
make
make check
make install
I added --prefix=/c/path/to/mingw to configure (How to build Google's protobuf in Windows using MinGW?) but it didnt help.
It fails at make with the message:
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/Markus/protobuf-3.0.0-alpha-
1/missing aclocal-1.14 -I m4
/home/Markus/protobuf-3.0.0-alpha-1/missing: line 81: aclocal-1.14: command not
found
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] Error 127
I've tried installing Automake but it doesnt come with aclocal.
Also today at work i managed to get it working on the first try with a bare MinGW & MSYS.
It looks like you need to install autoconf (which is separate from automake, though they are often used together). You may also need to install libtool.