Re: [gedit-list] Compile gedit with static libraries



I'm having this issue with trying to port gedit over to windows as well... hope someone figures this out...

On Sat, Apr 5, 2008 at 4:57 AM, Jesse van den Kieboom <jesse icecrew nl> wrote:
I think I got it to at least try to link all libraries static, by
manually invoking libtool with -all-static in the link command:

/bin/bash ../libtool --tag=CC   --mode=link gcc  -g -all-static -O2
-export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"  -o
gedit gedit.o libgedit.la -pthread -L/home/jesse/install/lib
-lgtksourceview-2.0 -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomecanvas-2
-lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2
-lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgnomevfs-2
-lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -ldl -lgobject-2.0 -lglib-2.0
-lattr -lattr

Which resulted in:

gcc -g -static -O2 -o gedit gedit.o -pthread
-Wl,--export-dynamic  ./.libs/libgedit.a
-L/home/jesse/install/lib /home/jesse/install/lib/libgtksourceview-2.0.so /usr/lib/libgnomeui-2.a -lSM -lICE /usr/lib/libbonoboui-2.a /usr/lib/libgnomecanvas-2.a /usr/lib/libgnome-2.a /usr/lib/libpopt.a /usr/lib/libbonobo-2.a /usr/lib/libbonobo-activation.a /usr/lib/libORBit-2.a /usr/lib/libart_lgpl_2.a /usr/lib/libglade-2.0.a /usr/lib/libgtk-x11-2.0.so /usr/lib/libxml2.a /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.a /usr/lib/libgdk_pixbuf-2.0.so -lm /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.a /usr/lib/libfreetype.a -lz -lfontconfig -lpng12 -lXrender -lX11 -lpixman-1 /usr/lib/libgnomevfs-2.a /usr/lib/libgconf-2.a /usr/lib/libgthread-2.0.a -lrt /usr/lib/libgmodule-2.0.a -ldl /usr/lib/libgobject-2.0.a /usr/lib/libglib-2.0.a /lib/libattr.a   -Wl,--rpath -Wl,/home/jesse/install/lib -Wl,--rpath -Wl,/home/jesse/install/lib
/usr/bin/ld: attempted static link of dynamic object
`/home/jesse/install/lib/libgtksourceview-2.0.so'
collect2: ld returned 1 exit status

I'll try to get it working :)


Jesse

Op zaterdag 05-04-2008 om 12:43 uur [tijdzone +0200], schreef Jesse van
den Kieboom:
> Okay, providing -static should do the trick, now that I look at it. Or
> does --enable-static add this to LDFLAGS?
>
> Jesse
>
> Op zaterdag 05-04-2008 om 12:39 uur [tijdzone +0200], schreef Jesse van
> den Kieboom:
> > Op vrijdag 04-04-2008 om 15:06 uur [tijdzone +0200], schreef Andrea
> > Gandolfi:
> > > Hi, I want to compile Gedit with static libraries, because I want to
> > > run it on a PC that do not have needed libraries and I can't install
> > > them on it. I try with this command: ./configure
> > > --prefix=/home/andrea/gedit --enable-static --disable-shared, then I
> > > do make and make install, but when I try the command
> > > ldd /home/andrea/gedit/bin/gedit it shows me all the dependencies...
> >
> > Isn't --enable-static and --enable-shared just for 'building'
> > shared/static libraries, not for actually linking in shared or static
> > libraries?
> >
> > I think you need to specify all the .a files for the different libraries
> > (the static versions of the libs) when linking gedit. Not sure if there
> > is a 'good' way to do this, a quick scan of pkg-config/gcc/ld didn't
> > give me any pointers on how to do this easily. (pkg-config provides
> > --static, but I don't think that does the trick).
> >
> >
--
Jesse van den Kieboom

Personal: http://www.icecrew.nl
Professional: http://www.novowork.com

_______________________________________________
gedit-list mailing list
gedit-list gnome org
http://mail.gnome.org/mailman/listinfo/gedit-list



--
Thanks,
Steve Zimmer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]