Mono instalacija (glib i pkg-config)

Pokusavam instalirati mono (.Net za linux) na suse 8.0 (gnome 1.4).

Da bi ga kompajlirao moram imati instalirane pkg-config i glib 1.3.
glib 1.3 sam nekako i uspio instalirati (zahvaljujuci rpm-u), dok pkg-config nisam:
Kada pokusam da instaliram pkg-config paket dobijem sljedecu poruku.

rpm -i //home/goran/pkgconfig-0.15.0-20.i586.rpm
error: failed dependencies:
libc.so.6(GLIBC_2.3) is needed by pkgconfig-0.15.0-20
RESULT=1

Kada pkg-config pokusam instalirati iz source-a, nakon ./configure, make no funcione. Mozda ce vam naredni redovi biti
od koristi:

goran@linux:~/pkgconfig-0.8.0> ./configure
creating cache ./config.cache
checking for a BSD compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… no
checking for working aclocal… missing
checking for working autoconf… missing
checking for working automake… missing
checking for working autoheader… missing
checking for working makeinfo… missing
checking whether to enable maintainer-specific portions of Makefiles… no
checking for Cygwin environment… no
checking for mingw32 environment… no
checking how to run the C preprocessor… cc -E
checking host system type… i686-pc-linux-gnu
checking build system type… i686-pc-linux-gnu
checking for gcc… gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… yes
checking whether gcc accepts -g… yes
checking for ld used by GCC… /usr/i486-suse-linux/bin/ld
checking if the linker (/usr/i486-suse-linux/bin/ld) is GNU ld… yes
checking for /usr/i486-suse-linux/bin/ld option to reload object files… -r
checking for BSD-compatible nm… /usr/bin/nm -B
checking whether ln -s works… yes
checking how to recognise dependant libraries… pass_all
checking for object suffix… o
checking for executable suffix… no
checking command to parse /usr/bin/nm -B output… ok
checking for dlfcn.h… yes
checking for ranlib… ranlib
checking for strip… strip
checking for objdir… .libs
checking for gcc option to produce PIC… -fPIC
checking if gcc PIC flag -fPIC works… yes
checking if gcc static flag -static works… yes
checking if gcc supports -c -o file.o… yes
checking if gcc supports -c -o file.lo…
checking if gcc supports -fno-rtti -fno-exceptions… yes
checking whether the linker (/usr/i486-suse-linux/bin/ld) supports shared libraries… yes
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking if libtool supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
creating libtool
checking for gcc… (cached) gcc
checking whether the C compiler (gcc -g -O2 ) works… yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler… no
checking whether we are using GNU C… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for working alloca.h… yes
checking for alloca… yes
checking for setresuid… yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
configuring in glib-1.2.8
running /bin/sh ./configure --cache-file=…/./config.cache --srcdir=.
loading cache …/./config.cache
checking for a BSD compatible install… (cached) /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… (cached) no
checking for working aclocal… missing
checking for working autoconf… missing
checking for working automake… missing
checking for working autoheader… missing
checking for working makeinfo… missing
checking host system type… i686-pc-linux-gnu
checking build system type… i686-pc-linux-gnu
checking for ranlib… (cached) ranlib
checking for gcc… (cached) gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for ld used by GCC… /usr/i486-suse-linux/bin/ld
checking if the linker (/usr/i486-suse-linux/bin/ld) is GNU ld… yes
checking for BSD-compatible nm… /usr/bin/nm -B
checking whether ln -s works… (cached) yes
updating cache …/./config.cache
loading cache …/./config.cache within ltconfig
checking for object suffix… o
checking for executable suffix… (cached) no
checking for gcc option to produce PIC… -fPIC
checking if gcc PIC flag -fPIC works… yes
checking if gcc supports -c -o file.o… yes
checking if gcc supports -c -o file.lo… yes
checking if gcc supports -fno-rtti -fno-exceptions … yes
checking if gcc static flag -static works… -static
checking if the linker (/usr/i486-suse-linux/bin/ld) is GNU ld… yes
checking whether the linker (/usr/i486-suse-linux/bin/ld) supports shared libraries… yes
checking command to parse /usr/bin/nm -B output… ok
checking how to hardcode library paths into programs… immediate
checking for /usr/i486-suse-linux/bin/ld option to reload object files… -r
checking dynamic linker characteristics… Linux ld.so
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for objdir… .libs
creating libtool
loading cache …/./config.cache
checking whether to enable maintainer-specific portions of Makefiles… no
checking host system type… i686-pc-linux-gnu
checking whether to enable memory checking… no
checking whether to enable memory profiling… no
checking for gcc… (cached) gcc
checking whether the C compiler (gcc -g -O2 ) works… yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler… no
checking whether we are using GNU C… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ANSI C… none needed
checking for a BSD compatible install… /usr/bin/install -c
checking for extra flags to get ANSI library prototypes… none needed
checking for extra flags for POSIX compliance… none needed
checking how to run the C preprocessor… (cached) cc -E
checking for ANSI C header files… yes
checking for vprintf… yes
checking for atexit… yes
checking for on_exit… yes
checking size of char… 1
checking size of short… 2
checking size of long… 4
checking size of int… 4
checking size of void *… 4
checking size of long long… 8
checking for working const… yes
checking for __inline… yes
checking for inline… yes
checking for inline… yes
checking whether byte ordering is bigendian… no
checking for float.h… yes
checking for limits.h… yes
checking for pwd.h… yes
checking for sys/param.h… yes
checking for sys/poll.h… yes
checking for sys/select.h… yes
checking for sys/time.h… yes
checking for sys/times.h… yes
checking for unistd.h… yes
checking for values.h… yes
checking for lstat… yes
checking for strerror… yes
checking for strsignal… yes
checking for memmove… yes
checking for vsnprintf… yes
checking for strcasecmp… yes
checking for strncasecmp… yes
checking for poll… yes
checking for sys_errlist… yes
checking for sys_siglist… yes
checking for sys_siglist declaration… yes
checking for fd_set… yes, found in sys/types.h
checking for wchar.h… yes
checking for wctype.h… yes
checking for iswalnum… yes
checking if iswalnum() and friends are properly defined… yes
checking whether realloc (NULL,) will work… yes
checking for an implementation of va_copy()… no
checking for an implementation of __va_copy()… yes
checking whether va_lists can be copied by value… yes
checking for dlopen… no
checking for dlopen in -ldl… yes
checking for dlsym in -ldl… yes
checking for preceeding underscore in symbols… no
checking for dlerror… yes
checking for pthread.h… yes
checking for thread implementation… posix
checking for pthread_attr_init in -lpthread… yes
checking necessary linker options… -lpthread
checking necessary compiler options… -D_REENTRANT
checking for localtime_r… yes
checking for rand_r… yes
checking for getpwuid_r… yes
checking whether getpwuid_r is posix like… yes
checking whether pthread_getspecific is posix like… yes
checking whether pthread_mutex_trylock is posix like… yes
checking whether pthread_cond_timedwait is posix like… yes
checking size of pthread_mutex_t… 24
checking byte contents of pthread_mutex_t… 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
checking system definitions for POLLIN POLLOUT POLLPRI POLLERR POLLHUP POLLNVAL… done
updating cache …/./config.cache
creating ./config.status
creating glib.spec
creating Makefile
creating glib-config
creating gmodule/gmoduleconf.h
creating gmodule/Makefile
creating gthread/Makefile
creating docs/Makefile
creating docs/glib-config.1
creating tests/Makefile
creating config.h
creating glibconfig.h

goran@linux:~/pkgconfig-0.8.0> make
bash: make: command not found

Za pocetak bi pomoglo da nam kazes koju verziju Mona pokusavas kompajlirati (pretpostavljam da je u pitanju 0.25 - zadnja verzija).

Tesko da je moguce da neki kod ovisi o glib 1.3.x jer je to bila razvojna verzija za glib 2.0 (koliko ja znam serija 1.x.x je dogurala do glib 1.2.10). A i tesko bi bilo povjerovati da je danasnji Mono zasnovan na biblioteci koja je izasla 02.04.2001. Najvjerovatnije da trebas glib 2.x. Jos jedna stvar koja potvrdjuje moje misljenje je da u README datoteci koja dodje uz gtk-sharp-0.10 stoji:

Sto se tice rpm paketa pkg-config - Da li mozda slucajno pokusavas instalirati rpm paket namijenjen za SuSE 8.2 ? (8.2 i 8.0 imaju POPRILICNO razlicite verzije i gcc-a i glibc-a). Da li mora biti paket 0.15, moze li 0.14 ili 0.13 (pkg-config 0.14 sam svojevremeno licno uspio kompajlirati na SuSE 8.0, kao i glib 2.0, gtk-2.0 itd.)

Kompajliranje pkg-config-a:

...
checking for working autoconf... missing
checking for working automake... missing
...
bash: make: command not found

Iz gornjeg je ocigledno je da nemas instalirane autoconf i automake (a ako imas, onda su previse stari).
(Da li je i sam make instaliran? - bash kaze da nije [-X )

Prije svega hvala ti na odlicnom postu.
Pa da krenem redom.
U pitanju je mono 0.25.
Pazljivije sam procitao README i zaista mono zavisi o glib.2.x
(mala digresija instalirao sam glib-1.3.13-1.i386.rpm paket),
Sto se tice pkg-config apsolutno pokusavam instalirati verziju za SuSE 8.2,
pokusacu sa 0.14 jer cinimi se da moze sve od 0.8

automake, autoconf i make nemam instalirane.
Na cd-u imam autoconf 2.52, automake 1.5 (mada trazi 1.4…) i make 3.79.1 ‘nadam se da nisu stari’.

Srdacan pozdrav,
Goran

http://rpmseek.com/rpm-pl/pkgconfig.html?hl=com&cs=pkgconfig:PN:0:0:0:0

Kao sto ovdje mozes vidjeti, odgovarajuca verzija za SuSE 8.0 je 0.10.0

http://rpmseek.com/rpm/pkgconfig-0.10.0-44.i386.html?hl=com&cs=pkgconfig:PN:0:0:0:0:162678

Sa pkgconfigom nisam imao nikakvih problema, instalirao sam 0.14, ali mi je problem glib (imam 2.0.6 i 2.2) koji je u izvornom kodu. Pokusao sam sa instalacijom medjutim nisam mnogo napravio.
Trazio sam negdje rpm (2.x) medjutim nisam ga uspio pronaci.
Postoji glib2 kao daodatak, ali koji vjerovatno nije isto sto i glib???

Srdacan pozdrav,
Goran

Hm…
Jedan od razloga zašto koristim Mandrake je to što apsolutno nema tog softvera za koji ne postoji RPM
(barem ja još nisam našao)
http://rpmseek.com/rpm-pl/mono.html?hl=com&cx=0::
SuSe puno slabije stoji po tom pitanju, ono što dođe na onih 5 CDova je sve otprilike :frowning:

Koji ce nam rpm kad imamo source (he, he)

Gorane, sto se tice pkg-config-a ne bi trebao miksati malo rpm, malo source pakete (tj. softver koji kompajliras sam).
Zasto?

rpm:
U SuSE izvedbi pkg-config drzi meta-podatke (*.pc datoteke) u direktoriju /usr/lib/pkg-config. Takodjer, i sve biblioteke koje koriste pkg-config smjestaju svoje meta-podatke u /usr/lib/pkg-config.

source:
Kada ti sam kompajliras pkg-config on smjesta meta-podatke u /usr/local/lib/pkg-config. Isto tako i sav softver koji koristi pkg-config smjesta svoje meta-podatke u /usr/local/lib/pkg-config.
Npr. gtk 2.x.x koji sam ja kompajlirao na svojoj masini smjestio je datoteke gtk±2.0.pc i gtk±x11-2.0.pc u /usr/local/lib/pkg-config.

a evo i sadrzaja gtk±2.0.pc:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=x11

gtk_binary_version=2.2.0
gtk_host=i686-pc-linux-gnu

Name: GTK+
Description: GIMP Tool Kit (${target} target)
Version: 2.2.2
Requires: gdk-${target}-2.0 atk
Libs: -L${libdir} -lgtk-${target}-2.0 
Cflags: -I${includedir}/gtk-2.0

pkg-config moze koristiti direktorij sa meta-podacima i iz environment varijable PKG_CONFIG_PATH.

Mislim da shvatas u cemu je problem. Ukoliko zelis koristiti oboje (rpm pkg-config i/ili rpm pakete i source) MORAS namjestiti varijablu PKG_CONFIG_PATH na /usr/local/lib/pkg-config. Iz man stranice pkg-config-a:

Zasto sam rekao da ne bi trebao miksati? Zato sto imas problem ukoliko imas dvije razlicite verzije istog paketa u /usr/lib/pkg-config i /usr/local/lib/pkg-config

Post je malo (?) konfuzan, al inadam se da sam bio od pomoci.

Ljudi hvala Vam na trudu, vremenu i novcu koji ste ulozili da bi mi odgovorili.

Ovaj post je trebao biti postavljen jos juce (prije prethodna dva) ali zbog j… provajdera :twisted: , bio je pohranjen u tekstualnu datoteku…

Uspio sam sa glib-om 2.0.6, trebalo je “samo” export PKG_CONFIG_PATH=/home/goran/glib-2.0.6
(checking for glib-2.0 >= 1.3.11… yes)

No kako mojoj sreci nema kraja, kada kompajliram mono sljedece linije mi nisu bas najjasnije:

linux:/home/goran/mono/install/mono-0.25 # ./configure

checking whether to enable maintainer-specific portions of Makefiles… no

checking whether we are cross compiling… no

checking whether -lc should be explicitly linked in… no
creating libtool
checking sys/filio.h usability… no
checking sys/filio.h presence… no
checking for sys/filio.h… no
checking sys/sockio.h usability… no
checking sys/sockio.h presence… no

checking for glib-2.0 >= 1.3.11… yes // JUHU
checking BASE_DEPENDENCIES_CFLAGS… -I$(top_builddir)//home/goran/glib-2.0.6 -I$(top_builddir)//home/goran/glib-2.0.6/. -I$(top_builddir)//home/goran/glib-2.0.6/./glib
checking BASE_DEPENDENCIES_LIBS… $(top_builddir)//home/goran/glib-2.0.6/glib/libglib-2.0.la
checking if off_t is 64 bits wide… no
checking if _FILE_OFFSET_BITS=64 gives 64 bit off_t… ok
checking for socket in -lsocket… no
checking for MSG_NOSIGNAL… yes
checking for SOL_IP… yes
checking for SOL_TCP… no

checking whether we are cross compiling… no

checking for a BSD-compatible install… /usr/bin/install -c
checking whether to enable maintainer-specific portions of Makefiles… no

checking whether -lc should be explicitly linked in… no
creating libtool
checking if host is AViiON running DGUX… checking sys/dg_sys_info.h usability… no
checking sys/dg_sys_info.h presence… no
checking for sys/dg_sys_info.h… no
checking whether to enable maintainer-specific portions of Makefiles… no

Nakon ovoga slijedi:

linux:/home/goran/mono/install/mono-0.25 # make
make all-recursive
make[1]: Entering directory /home/goran/mono/install/mono-0.25' Making all in libgc make[2]: Entering directory/home/goran/mono/install/mono-0.25/libgc’
Making all in include
make[3]: Entering directory /home/goran/mono/install/mono-0.25/libgc/include' Making all in private make[4]: Entering directory/home/goran/mono/install/mono-0.25/libgc/include/private’
make[4]: Nothing to be done for all'. make[4]: Leaving directory/home/goran/mono/install/mono-0.25/libgc/include/private’
make[4]: Entering directory /home/goran/mono/install/mono-0.25/libgc/include' make[4]: Nothing to be done forall-am’.
make[4]: Leaving directory /home/goran/mono/install/mono-0.25/libgc/include' make[3]: Leaving directory/home/goran/mono/install/mono-0.25/libgc/include’
Making all in doc
make[3]: Entering directory /home/goran/mono/install/mono-0.25/libgc/doc' make[3]: Nothing to be done forall’.
make[3]: Leaving directory /home/goran/mono/install/mono-0.25/libgc/doc' make[3]: Entering directory/home/goran/mono/install/mono-0.25/libgc’
make[3]: Nothing to be done for all-am'. make[3]: Leaving directory/home/goran/mono/install/mono-0.25/libgc’
make[2]: Leaving directory /home/goran/mono/install/mono-0.25/libgc' Making all in mono make[2]: Entering directory/home/goran/mono/install/mono-0.25/mono’
Making all in utils
make[3]: Entering directory /home/goran/mono/install/mono-0.25/mono/utils' source='mono-hash.c' object='mono-hash.lo' libtool=yes depfile='.deps/mono-hash.Plo' tmpdepfile='.deps/mono-hash.TPlo' depmode=gcc /bin/sh ../../depcomp /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../mono -I../../libgc/include -I../..//home/goran/glib-2.0.6 -I../..//home/goran/glib-2.0.6/. -I../..//home/goran/glib-2.0.6/./glib -I../..//home/goran/glib-2.0.6 -I../..//home/goran/glib-2.0.6/. -I../..//home/goran/glib-2.0.6/./glib -I../..//home/goran/glib-2.0.6/./gmodule -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions -D_FILE_OFFSET_BITS=64 -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -c -o mono-hash.lotest -f ‘mono-hash.c’ || echo ‘./’mono-hash.c rm -f .libs/mono-hash.lo gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../mono -I../../libgc/include -I../..//home/goran/glib-2.0.6 -I../..//home/goran/glib-2.0.6/. -I../..//home/goran/glib-2.0.6/./glib -I../..//home/goran/glib-2.0.6 -I../..//home/goran/glib-2.0.6/. -I../..//home/goran/glib-2.0.6/./glib -I../..//home/goran/glib-2.0.6/./gmodule -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions -D_FILE_OFFSET_BITS=64 -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -c mono-hash.c -Wp,-MD,.deps/mono-hash.TPlo -fPIC -DPIC -o .libs/mono-hash.lo mono-hash.c:39: glib.h: No such file or directory In file included from mono-hash.c:41: mono-hash.h:36: glib.h: No such file or directory make[3]: *** [mono-hash.lo] Error 1 make[3]: Leaving directory/home/goran/mono/install/mono-0.25/mono/utils’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /home/goran/mono/install/mono-0.25/mono' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/goran/mono/install/mono-0.25’
make: *** [all] Error 2

Ako mozete pomozite.
Sta mi je potrebno, a sta bi mogao izostaviti?

Srdacan pozdrav,
Goran

P.S Adise hvala na iscrpnom objasnjenu pkg-configa. Samo tako nastavi…

Jos jedan veliki pozdrav svima.

Sad cu odmah biti konkretan:

Pretpostavljam da si uradio slijedece (u svom home direktoriju):

$ > tar -xzf glib-2.0.6.tar.gz
$ > cd glib-2.0.6
$ > ./configure
$ > make
$ > export PKG_CONFIG_PATH=/home/goran/glib-2.0.6

To znaci da si preskocio jedan korak, “make install” kao root korisnik. (ispravi me ako grijesim).

Pogledajmo malo sadrzaj glib-2.0.pc

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.2.2
Libs: -L${libdir} -lglib-2.0   
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include

Sve 2.x…x verzije glib-a instaliraju se u gore navedenu hijerarhiju direktorija (od varijable $prefix sve pocinje, primjeti liniju includedir=${prefix}/include). prefix inace odredjujes prilikom kompajliranja sa “./configure --prefix=/direktorij/po/izboru”
ako se pitas “kako ja ovo mogu znati?” otkucaj “./configure --help” i imas listu opcija :smiley:

Dakle, include datoteke za glib-2.0.6 MORAJU se nalaziti u nekom direktoriju tipa $prefix/include/glib-2.0 ; gdje je prefix definisan u prvoj liniji *.pc datoteke (obrati paznju na zadnji red listinga i varijablu $cflags koja se automatski prosljedjuje kompajleru!)

Tako da kad pises C kod koristis jednostavno:

#include <glib.h>

Jer ti varijabla $cflags sadrzi stazu do “$prefix/include/glib-2.0”, u kojem se nalazi nas glib.h

Kod tebe je varijabla $cflags sadrzi:

-I../..//home/goran/glib-2.0.6/./glib
-I../..//home/goran/glib-2.0.6/./glib

Sto jednostavno ne moze biti, jer mora biti oblika -I${includedir}/glib-2.0 (kao sto stoji u *.pc datoteci)

Da se mi ne ganjamo “vako” po internetu, zasto ti ne bi dosao u ULK pa da to sve fino probamo na nekom racunaru, onako uzivo? (ne znam da li si u Sarajevu). Mozda da dodjes na prevodilacki maraton (he, he - sluzimo se svim sredstvima da privucemo raju :lol: ).
Poneses fino softvera sto si skinuo na CD-u (ili cemo mi skinuti, nije frka), ja ponesem CD sa (taze) source-om svih gtk2 biblioteka (glib, gtk, pango …) i mi probamo taj Mono instalirati.

Ako ne, NEVERMIND.

Samo nastavi “cackati” :wink:

Ako sam za prvi rekao da je odlican, ovaj je sigurno vise od toga.

Na zalost siguran sam da nisam preskocio make install (a ni make clean +nerd+), a kompletnu ‘instalaciju’ sam radio kao root.

Sadrzaj glib-2.0.pc je doslovan, ako izuzmemo nebitan red o verziji.

Ok, nisam kompajlirao sa prefiksom (samo ./configure), iz razloga sto nisam znao gdje ce ‘razbacati’ datoteke, pa sam mislio kad je bal nek je maskenbal, neka sve ide u trenutni direktorijum a onda cu sa make clean pocistiti…

Posto je mono nakon ./configure izbacio gresku da ne moze pronaci glib-2.0.pc,
i da je pozeljno da eksportujem PKG_CONFIG_PATH to sam i uradio.

Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containingglib-2.0.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘glib-2.0’ found
checking for glib-2.0 >= 1.3.11… Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘glib-2.0’ found

configure: error: Library requirements (glib-2.0 >= 1.3.11) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

Posto sam promjenio strategiju, glib instalirati u /opt/glib a mono u /opt/mono,
pokusao sam export PKG_CONFIG_PATH=/opt/glib/include/glib-2.0 i on naravno opet nije pronasao glib-2.0.pc.
Zatim sam napravio dvostruki export
export PKG_CONFIG_PATH=/opt/glib/include/glib-2.0:/home/goran/glib-2.0.6

i dobio (./configure --prefix=/opt/mono)

checking for pkg-config… /usr/local/bin/pkg-config
*** Your version of pkg-config is too old. You need version 0.9.0 or newer.
*** See http://www.freedesktop.org/software/pkgconfig
configure: error: Library requirements (glib-2.0 >= 1.3.11) not met;
consider adjusting the PKG_CONFIG_PATH environment variable
if your libraries are in a nonstandard prefix so pkg-config can find them.

Ovu gresku ne dobijam sa export PKG_CONFIG_PATH=/home/goran/glib-2.0.6.
Nelogicno, ali tako.
Sve u svemu nisam uspio.

Pokusao sam kopirati glib-2.0.pc u /opt/glib/include/glib-2.0 i onda exportovati tu putanju,
ali sam nako make koji je radio cijele 2 minute dobio
/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:448: undefined reference to g_module_build_path' /home/goran/mono/install/mono-0.25/mono/metadata/loader.c:449: undefined reference tog_module_open’
/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:453: undefined reference to g_module_build_path' /home/goran/mono/install/mono-0.25/mono/metadata/loader.c:454: undefined reference tog_module_open’
/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:458: undefined reference to g_module_error' /home/goran/mono/install/mono-0.25/mono/metadata/loader.c:459: undefined reference tog_module_open’
/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:470: undefined reference to g_module_symbol' /home/goran/mono/install/mono-0.25/mono/metadata/loader.c:477: undefined reference tog_module_symbol’
/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:481: undefined reference to g_module_symbol' /home/goran/mono/install/mono-0.25/mono/metadata/loader.c:484: undefined reference tog_module_symbol’
/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:489: undefined reference to g_module_symbol' ../metadata/.libs/libmetadata.al(loader.lo):/home/goran/mono/install/mono-0.25/mono/metadata/loader.c:493: more undefined references tog_module_symbol’ follow
…/metadata/.libs/libmetadata.al(assembly.lo): In function mono_assembly_open': /home/goran/mono/install/mono-0.25/mono/metadata/assembly.c:401: undefined reference tog_module_open’
/home/goran/mono/install/mono-0.25/mono/metadata/assembly.c:406: undefined reference to g_module_symbol' /home/goran/mono/install/mono-0.25/mono/metadata/assembly.c:409: undefined reference tog_module_close’
…/…/libgc/.libs/libmonogc.so: undefined reference to dlopen' collect2: ld returned 1 exit status make[3]: *** [monosn] Error 1 make[3]: Leaving directory/home/goran/mono/install/mono-0.25/mono/metadata’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /home/goran/mono/install/mono-0.25/mono' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/goran/mono/install/mono-0.25’
make: *** [all] Error 2
Sve u svemu nisam uspio.

Volio bih doci na maraton (mada je i ovo neka vrsta maratona) ali trenutno nisam u Sarajevu.
Doci cu tek u septembru i konacno navratiti (radim poslijepodne :cry:).

Mislim da cu ipak skinuti mono u rpm formatu, s obzirom da je radjen za SuSE 8.0 i okoncati ovu agoniju
(mada bi to bilo tako tuzno - ali ne zbog 17 MB).

U svakom slucaju hvala jos jednom, mnogo sam naucio
Srdacan pozdrav,
Goran

Ne trebas nista od gore navedenog raditi kao root. Samo za “make install” moras biti root!

A imas i problem ako si samo uradio “su” (u nekom xterm prozoru). Sama komanda su ne podesi environment varijable, od $PATH, $LD_LIBRARY_PATH itd.

Ako zelis raditi kao root ili kucaj “su -” sto ucita sve env varijable ili se kompletno logiraj kao root (u kdm prozoru).

Ja ti preporucujem da probas sve konfigurisati/kompajlirati kao obican korisnik (AKA goran), a samo “make install” kao root. (to je u slucaju da si konfigurisao softver sa --prefix=/direktorij/u/kojem/nemas/pravo/pisanja, kao npr. defaultni --prefix=/usr/local). Ako instaliras u neki direktorij “ispod” svog home direktorija onda uopste ne moras postajati root.

Dakle, standardna UNIX praksa: kao root radi samo ono sto apsolutno moras, a ponekad ni to.

:slight_smile:

P.S.

Mozda da probas kompajlirati taj pkg-config 0.15 :?:
I nemoj zaboraviti ukloniti taj stari pkg-config koji ti jos uvijek “visi” u /usr/local/bin (na SuSE-u ti je varijabla $PATH namjestena na:
PATH=/usr/local/bin:itd:itd) jer uvijek prvo “naletis na njega” (a to ne zelis).

P.P.S
Dobro si “promuckao” tu distribuciju (he, he). Predlazem ti da pocnes citav proces ispocetka, sa “clean room” pristupom: ostavljaj sve ispod /usr/local (po LSB-u same distribucije NIKADA nece nesto instalirati ispod /usr/local, tako da se mozes igrati u /usr/local “koliko ti dusa hoce”. Ako nesto “zabrljas” izbrises sadrzaj /usr/local/bin i /usr/local/lib i sve je dure; a i 95% source paketa je po defaultu konfigurisano na /usr/local hijerarhiju).

Kompajliraj (ovim redom):
pkg-config 0.15
glib 2.2.2
atk 1.2.4
pango 1.2.3
gtk 2.2.2

(za sve je ista procedura: “./configure” “make” “su” “make install” “exit”)
Pa vidi onda kako ce se taj mono ponasati:

Hvala ti po ko zna koji put.

Do sad sam se prijavljivao samo sa ‘su’ kao root, ali sam primjetio
da i sa ‘su’ i sa ‘su -’ uopste nemam podesenu $LD_LIBRARY_PATH
(ako komanda ‘export’ prikazuje sve promjenjive okruzenja).

pkgconfig vise ne mogu ni ukloniti. Posto sam instalirao i 0.10 i 0.14
kao rpm pakete dobijam sljedecu gresku
rpm -e pkgconfig;echo RESULT=$?
error: “pkgconfig” specifies multiple packages
RESULT=1

Ali u svakom slucaj krenuo sam sa pkgconfigom 0.15. make install sam radio
kao root ali sam se mora prijaviti pomocu ‘su’ jer sam primjetio da
ona ima kraci PATH="/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin"
bez /usr/local/bin za razliku od ‘su -’ (koristio sam echo $PATH da to provjerim).
Jedino cudno je prijava
checking for working aclocal-1.4… missing
checking for working automake-1.4… missing

Takodje, make i make install zavrsili su u rekordnom roku (1 sec.).

glib-2.2.1 nije prosao. Kao i pkfconfigu nedostajali su aclocal-1.4 i
automake-1.4. ali greska
checking for msgfmt… no
configure: error:
*** You must have either have gettext support in your C library, or use the
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
zaustavila je dalju instalaciju.

I na samom kraju sve sam blizi rpm downloadu, jer ovoliku zavisnost
nisam ni licno dozivio :allco: (ni u najboljim danima +rr+ ).

Srdacan pozdrav,
Goran

P.S.
Izvini sto sam te pegl’o.