[MINC-users] compilation on fedora

Soren Christensen sorench at gmail.com
Wed Jun 28 07:21:48 EDT 2006


Hi Simon,
 Thanks for the advice. It seems that configure cannot find glut on my
Fedora 5 (although it is there).  I get a "no" where you get lglut.
I manually edited the Makefile after configure and put GLUTLIB=-lglut,
that worked. Same thing with register. Not sure why configure cannot
establish -lglut.
I am working on a little note on how to solve a few additional
problems on Fedora 5 in case others a stuck with the same issues.

Cheers
Soren

On 6/28/06, Simon Fristed Eskildsen <se at hst.aau.dk> wrote:
> Hi Soren,
> If configure cannot find the glut lib, the -lglut is not added to the
> gcc command. So you need to make sure that configure finds the glut lib:
> checking for OpenGL library... -lGL
> checking for OpenGL Utility library... -lGLU
> checking for GLUT library... -lglut
>
> The autoconf macro AX_CHECK_GLUT is used to check for glut:
> dnl Check for GLUT. If GLUT is found, the required compiler and linker
> dnl flags are included in the output variables "GLUT_CFLAGS" and
> dnl "GLUT_LIBS", respectively.
>
> Since adding -lglut to the gcc manually seems to work, you obviously
> have glut installed. If it is installed outside /usr/lib try setting the
> LDFLAGS environment variable.
> export LDFLAGS=-L/path/to/libglut
> ...and perhaps the LD_LIBRARY_PATH:
> export LD_LIBRARY_PATH=-L/path/to/libglut
> The last one however should not be necessary as the run-time shared
> library loader finds the glut lib ok.
>
> Simon
>
> Soren Christensen wrote:
>
> >Hi Andrew,
> > I tried to compile Mesa but it causes some trouble that the X
> >libraries are relocated in Fedora 5.   However, I tried to run the
> >command where make fails (below), but adding -lglut
> >as an option - that seemed to work.
> >My skills in the Make system are limited to trial and error +
> >googling, so I'd really apreciate if some one could direct me to where
> >I should enter -lglut so that it is put as an option automatically.
> >Also, if someone has an idea why (Display) it is not working out of
> >the box on Fedora 5 I'd like to hear  about that.
> >
> >Thanks!
> >
> >Soren
> >
> >
> >
> >
> >
> >
> >gcc -g -O2 -o Display dummy.o main/main.o main/display.o
> >main/event_loop.o main/graphics.o main/three_d.o main/transforms.o
> >atlas/atlas.o input_files/input_files.o input_files/volume_file.o
> >callbacks/atlas.o callbacks/call_globals.o callbacks/colour_coding.o
> >callbacks/file.o callbacks/line_ops.o callbacks/object_ops.o
> >callbacks/marker_ops.o callbacks/polygon_ops.o callbacks/quit.o
> >callbacks/regions.o callbacks/render_ops.o callbacks/segmenting.o
> >callbacks/surf_segmenting.o callbacks/surface_curves.o
> >callbacks/surface_extract.o callbacks/view_ops.o
> >callbacks/volume_ops.o callbacks/volume_transform_ops.o
> >current_obj/current_obj.o edit_surface/connected.o edit_surface/edit.o
> >edit_surface/segment.o images/images.o markers/markers.o
> >surface_extraction/boundary_extraction.o
> >surface_extraction/data_structs.o surface_extraction/init_surface.o
> >surface_extraction/extract.o surface_extraction/surface.o
> >surface_extraction/surface_events.o voxel_scan/scan_objects.o
> >events/change_markers.o events/clip_plane.o events/film_loop.o
> >events/magnify.o events/mouse.o events/mouse_trans.o
> >events/pick_object.o events/pick_view.o events/rotate_slice.o
> >events/spaceball.o events/virt_sb.o events/window_man.o
> >events/utilities.o immediate_mode/draw_immed.o
> >intersect/ray_polygons.o intersect/plane_polygons.o cursor/cursor.o
> >cursor/cursor_icon.o menu/build_menu.o menu/cursor_pos.o menu/menu.o
> >menu/input_menu.o menu/selected.o menu/text.o
> >cursor_contours/contours.o segmenting/cut_neighbours.o
> >segmenting/painting.o segmenting/segmenting.o
> >segmenting/segment_polygons.o slice_window/colour_bar.o
> >slice_window/colour_coding.o slice_window/crop.o
> >slice_window/draw_slice.o slice_window/histogram.o
> >slice_window/pick_angle.o slice_window/quadmesh.o slice_window/slice.o
> >slice_window/slice_3d.o slice_window/slice_events.o
> >slice_window/undo.o slice_window/view.o surface_curves/closest_line.o
> >surface_curves/events.o surface_curves/edge_distance.o
> >tubes/convert_lines.o structures/action_table.o structures/fit_view.o
> >structures/lights.o structures/render.o structures/view.o
> >structures/window.o  Graphics/libbicgl.a -lGLU -lGL -lbicpl
> >-lvolume_io -lminc -lnetcdf -lm
> >
> >Gives:
> >slice_window/crop.o: In function `crop_and_load_volume':
> >/root/Desktop/download/Display-1.4.1/slice_window/crop.c:165: warning:
> >the use of `tmpnam' is dangerous, better use `mkstemp'
> >Graphics/libbicgl.a(glut_windows.o): In function `lookup_font':
> >/root/Desktop/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:692:
> >undefined reference to `glutBitmap8By13'
> >Graphics/libbicgl.a(glut_windows.o): In function `WS_add_idle_function':
> >/root/Desktop/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:1151:
> >undefined reference to `glutIdleFunc'
> >Graphics/libbicgl.a(glut_windows.o): In function `flip_screen_y':
> >/root/Desktop/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:919:
> >undefined reference to `glutGet'
> >Graphics/libbicgl.a(glut_windows.o): In function `flip_window_y':
> >
> >
> >But adding -lglut to that line will give
> >slice_window/crop.o: In function `crop_and_load_volume':
> >/root/Desktop/download/Display-1.4.1/slice_window/crop.c:165: warning:
> >the use of `tmpnam' is dangerous, better use `mkstemp'
> >
> >Which i assume is an insignificant warning.
> >
> >
> >
> >
> >On 6/26/06, Andrew Janke <a.janke at gmail.com> wrote:
> >
> >
> >>Hi Soren,
> >>
> >>Amusingly enough I came across this same problem with a machine or two
> >>in Stockholm just last week... In my case the solution was to get and
> >>compile a version of GLUT as opposed to using the system version.  I
> >>canna remember the version that I used though.. :(  Suffice to say, no
> >>RPM that I could find (via rpmfind/etc) seemed to work.
> >>
> >>
> >>a
> >>
> >>On 6/26/06, Soren Christensen <sorench at gmail.com> wrote:
> >>
> >>
> >>>Dear MINc users,
> >>> I was wondering if anybody had experience with compiling the MINC
> >>>tools under Fedora 5.
> >>>I previously posted a problem with the CLK_TCK macro that could not be
> >>>found by the linker. I found a solution to that on:
> >>>http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_19.html
> >>>In case other people experience the same problem.
> >>>However, now I am stuck with compilation of Display (MINC, NETCDF and
> >>>BICPL seem to work).
> >>>The error below arises when running make (for Display).
> >>>Could anyone see where the problem is - I guess it has something to do
> >>>with GLUT but i am not excatly sure how to narrow it down further.
> >>>
> >>>Thanks and best regards
> >>>Soren
> >>>
> >>>.....
> >>>gcc -g -O2 -o Display dummy.o main/main.o main/display.o
> >>>main/event_loop.o main/graphics.o main/three_d.o main/transforms.o
> >>>atlas/atlas.o input_files/input_files.o input_files/volume_file.o
> >>>callbacks/atlas.o callbacks/call_globals.o callbacks/colour_coding.o
> >>>callbacks/file.o callbacks/line_ops.o callbacks/object_ops.o
> >>>callbacks/marker_ops.o callbacks/polygon_ops.o callbacks/quit.o
> >>>callbacks/regions.o callbacks/render_ops.o callbacks/segmenting.o
> >>>callbacks/surf_segmenting.o callbacks/surface_curves.o
> >>>callbacks/surface_extract.o callbacks/view_ops.o
> >>>callbacks/volume_ops.o callbacks/volume_transform_ops.o
> >>>current_obj/current_obj.o edit_surface/connected.o edit_surface/edit.o
> >>>edit_surface/segment.o images/images.o markers/markers.o
> >>>surface_extraction/boundary_extraction.o
> >>>surface_extraction/data_structs.o surface_extraction/init_surface.o
> >>>surface_extraction/extract.o surface_extraction/surface.o
> >>>surface_extraction/surface_events.o voxel_scan/scan_objects.o
> >>>events/change_markers.o events/clip_plane.o events/film_loop.o
> >>>events/magnify.o events/mouse.o events/mouse_trans.o
> >>>events/pick_object.o events/pick_view.o events/rotate_slice.o
> >>>events/spaceball.o events/virt_sb.o events/window_man.o
> >>>events/utilities.o immediate_mode/draw_immed.o
> >>>intersect/ray_polygons.o intersect/plane_polygons.o cursor/cursor.o
> >>>cursor/cursor_icon.o menu/build_menu.o menu/cursor_pos.o menu/menu.o
> >>>menu/input_menu.o menu/selected.o menu/text.o
> >>>cursor_contours/contours.o segmenting/cut_neighbours.o
> >>>segmenting/painting.o segmenting/segmenting.o
> >>>segmenting/segment_polygons.o slice_window/colour_bar.o
> >>>slice_window/colour_coding.o slice_window/crop.o
> >>>slice_window/draw_slice.o slice_window/histogram.o
> >>>slice_window/pick_angle.o slice_window/quadmesh.o slice_window/slice.o
> >>>slice_window/slice_3d.o slice_window/slice_events.o
> >>>slice_window/undo.o slice_window/view.o surface_curves/closest_line.o
> >>>surface_curves/events.o surface_curves/edge_distance.o
> >>>tubes/convert_lines.o structures/action_table.o structures/fit_view.o
> >>>structures/lights.o structures/render.o structures/view.o
> >>>structures/window.o  Graphics/libbicgl.a -lGLU -lGL -lbicpl
> >>>-lvolume_io -lminc -lnetcdf -lm
> >>>slice_window/crop.o: In function `crop_and_load_volume':
> >>>/root/download/Display-1.4.1/slice_window/crop.c:165: warning: the use
> >>>of `tmpnam' is dangerous, better use `mkstemp'
> >>>Graphics/libbicgl.a(glut_windows.o): In function `lookup_font':
> >>>/root/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:692:
> >>>undefined reference to `glutBitmap8By13'
> >>>Graphics/libbicgl.a(glut_windows.o): In function `WS_add_idle_function':
> >>>/root/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:1151:
> >>>undefined reference to `glutIdleFunc'
> >>>Graphics/libbicgl.a(glut_windows.o): In function `flip_screen_y':
> >>>/root/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:919:
> >>>undefined reference to `glutGet'
> >>>Graphics/libbicgl.a(glut_windows.o): In function `flip_window_y':
> >>>/root/download/Display-1.4.1/Graphics/GLUT_windows/glut_windows.c:913:
> >>>undefined reference to `glutGet'
> >>>Graphics/libbicgl.a(glut_windows.o): In function `WS_get_screen_size':.......
> >>>_______________________________________________
> >>>MINC-users at bic.mni.mcgill.ca
> >>>http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >>>
> >>>
> >>>
> >>--
> >>Andrew Janke   (a.janke at gmail.com || http://a.janke.googlepages.com/)
> >>Canada->Montreal                                   Cell: +1 (514) 924 2012
> >>_______________________________________________
> >>MINC-users at bic.mni.mcgill.ca
> >>http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >>
> >>
> >>
> >_______________________________________________
> >MINC-users at bic.mni.mcgill.ca
> >http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
> >
> >
>
> --
> Simon Fristed Eskildsen, M.Sc.EE., Ph.D. Student
> Denmark->Aalborg->HST->MI (se at hst.aau.dk || +45 9635 9823)
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>


More information about the MINC-users mailing list