compilation de glib avec des chemins non standard
Je suis en train de compiler glib-2.32.1
donc j'ai installé libffi-3.0.1
dans le chemin d'accès suivant:
~/localroot/lib/
et les fichiers d'en-tête sont:
~/localroot/lib/libffi-3.0.11/include/
Cependant, quand je configure:
~/tmp/build_alot/glib-2.32.1 $ ./configure --prefix=~/localroot
Je vois le message d'erreur suivant:
checking whether to cache iconv descriptors... no
checking for ZLIB... yes
checking for LIBFFI... no
configure: error: Package requirements (libffi >= 3.0.0) were not met:
No package 'libffi' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Quelles sont les valeurs correctes que j'ai besoin de pour LIBFFI_LIBS
et LIBFFI_CFLAGS
pour compiler correctement glib?
tout petit peu d'infos supplémentaires:
Lorsque j'ai compilé libffi j'ai eu la suivante info utile:
Les bibliothèques ont été installés dans:
/home/nahum/localroot/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/home/user/localroot/share/info" || /bin/mkdir -p "/home/user/localroot/share/info"
/usr/bin/install -c -m 644 ../doc/libffi.info '/home/nahum/localroot/share/info'
install-info --info-dir='/home/user/localroot/share/info' '/home/user/localroot/share/info/libffi.info'
test -z "/home/user/localroot/lib/pkgconfig" || /bin/mkdir -p "/home/user/localroot/lib/pkgconfig"
/usr/bin/install -c -m 644 libffi.pc '/home/user/localroot/lib/pkgconfig'
make[3]: Leaving directory `/home/user/tmp/build_alot/libffi-3.0.11/x86_64-unknown-linux-gnu'
make[2]: Leaving directory `/home/user/tmp/build_alot/libffi-3.0.11/x86_64-unknown-linux-gnu'
make[1]: Leaving directory `/home/user/tmp/build_alot/libffi-3.0.11/x86_64-unknown-linux-gnu'
Réglage PKG_CONFIG_PATH
à /home/user/localroot/lib/pkgconfig
n'est toujours pas le succès.
source d'informationauteur Oz123
Vous devez vous connecter pour publier un commentaire.
sur le chemin de l'illumination...
J'ai réussi à compiler glib:
Maintenant, je dois voir si les dépendances en bas de la route sont tous heureux avec la façon dont j'ai compilé.
Pour ceux comme moi qui en étaient à se demander où est la
-I
et-L
et-lffi
drapeaux venu (Oz123 de réponse), j'ai découvert qu'ils peuvent être trouvés dans:De la lecture du fichier donne:
Utiliser le
Libs
etCflags
lieu pour définir leLIBFFI_LIBS
etLIBFFI_CFLAGS
variable, respectivement. Maintenant, si vous exécutez./configure
puismake && make install
les choses devraient fonctionner (au moins pour moi).