LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   trying to compile gEDA (https://www.linuxquestions.org/questions/slackware-14/trying-to-compile-geda-545243/)

bioe007 04-21-2007 12:50 AM

sorry to keep making glue here.. i have another question i came across a lot of LD_LIBRARY_PATH bashers on the internet while searching about this variable.

would it be better so edit /etc/ld.so.conf and add the /opt/gEDA/lib so that ldconfig can find the libraries? same question for the PATH and PKG_CONFIG variables (gEDA reqires these be set)

also I read there is an -R linker option that can specify the path for runtime libraries, would this be a better solution?

<later>
SUCCESS! i am looking at gschem now! thanks everyone!

jong357 04-21-2007 01:50 AM

Could I possibly impose upon you to post the same snippet of your sucessful make? I think I've spotted what was the problem but would like to know what the sucessfull make looks like. The same part you posted... Thanks.. :) If not, no biggie.

bioe007 04-21-2007 02:26 AM

but of course, enlightenment is what I seek... :)


i think this is the right snippet? right at the end where it was geting linked? sorry, if yo need more let me know and I'll post it. (as long as you promise to post an explanation :D )

<edit - too hard to read>
Code:

/bin/sh ../libtool --silent --tag=CC  --mode=link gcc -Wall -g -O2 -version-info 28:0:0
-pthread -lguile -lltdl -L/usr/lib -lgmp -lcrypt -lm -lltdl -L/usr/lib -L/usr/X11R6/lib -lXpm
-lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm -lgd -lglib-2.0    -lgdk_pixbuf-2.0 -lm
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0    -o libgeda.la -rpath
/opt/gEDA/lib a_basic.lo f_basic.lo f_print.lo f_image.lo g_basic.lo m_basic.lo o_arc_basic.lo
o_attrib.lo o_basic.lo o_box_basic.lo o_circle_basic.lo o_complex_basic.lo o_line_basic.lo
o_list.lo o_net_basic.lo o_selection.lo o_bus_basic.lo o_text_basic.lo o_pin_basic.lo o_image.lo
o_embed.lo u_basic.lo s_attrib.lo s_basic.lo s_clib.lo s_encoding.lo s_hierarchy.lo
s_papersizes.lo s_stretch.lo s_log.lo s_page.lo s_slib.lo s_color.lo s_undo.lo s_conn.lo s_cue.lo
s_tile.lo s_menu.lo s_toplevel.lo g_smob.lo libgeda.lo g_register.lo g_rc.lo i_vars.lo
o_picture.lo gdk-pixbuf-hacks.lo 
make[2]: Leaving directory `/usr/local/src/gEDA/gedagaf/libgeda-20070216/src'
Making all in include
make[2]: Entering directory `/usr/local/src/gEDA/gedagaf/libgeda-20070216/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/gEDA/gedagaf/libgeda-20070216/include'
Making all in scripts
make[2]: Entering directory `/usr/local/src/gEDA/gedagaf/libgeda-20070216/scripts'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/gEDA/gedagaf/libgeda-20070216/scripts'
Making all in docs
make[2]: Entering directory `/usr/local/src/gEDA/gedagaf/libgeda-20070216/docs'
Type: make doxygen  to create doxygen documentation for libgeda


jong357 04-21-2007 06:19 PM

Yea, that's what I expected to see. Don't you see a difference?

-L/usr/X11R6/lib


For some reason it wasn't searching /usr/X11R6 as the lack of a linker flag with your first make output shows. But this time around, it's in there, therefore, it picked up on your libs.

Specifying:

CPPFLAGS="-L/usr/X11R6/lib" make (that or tag it to ./configure, or both)

would have fixed your problem. Do a ./configure --help to make sure. It's either CPPFLAGS or CXXFLAGS but I think it's the former. CXXFLAGS should be for specifying includes and CPPFLAGS for libs. Just keep that in mind if anything like this happens again and you know the libs are on your system. That's what those variables are for. To give it a nudge in the right direction if need be.

Do a configure --help. I'm a little fuzzy from pain pills and don't have a linux box at the moment.. ;) CXXFLAGS are used for optimization I believe, not includes. It's something like that... configure will tell you.

jong357 04-21-2007 06:42 PM

As for your final question about your library path, this is what I would do. Look in /etc/profile.d/ and have a peek at the java sh file in there. I'm assuming you have java installed. I'd make a "geda.sh" script to put in /etc/profile.d that does the same thing.

But you probably should add /opt/geda/lib (or whatever) to ld.so.conf anyway. If you find man pages in /opt/geda, you could define that directory with man.conf... ect... ect...

piete 04-22-2007 07:24 AM

Well spotted. I think it's LDFLAGS="-L/usr/X11R6/lib" ./configure, since it's the linker that's having problems. Anyway, to do that for everything? That'd be a nuisance.

Glad it's all worked out, though!

As for LD_LIBRARY_PATH ... mostly you only need that stuff during compilation, for dynamic linking at run time ... once you've run ld.so.conf with $LD_LIBRARY_PATH="/opt/geda/lib" or similar, the necessary shared libraries will be linked properly, so you shouldn't need to do anything else to make it work.

If you do, then you'll be ok with just adding the library path to ld.so.conf and being done with it.

For packaging, however, jong might be on to something by putting any global environment variables into a profile script and packaging that up too.

Glad it's sorted.

jong357 04-22-2007 01:39 PM

It is LDFLAGS for libs and CPPFLAGS for includes... Was having a hard time thinking straight last night... ;)

bioe007 04-22-2007 11:49 PM

many thanks to all!

this what i love about slackware..


All times are GMT -5. The time now is 03:21 AM.