Compilation error

Help
Patrick
2007-10-06
2013-04-22
  • Patrick

    Patrick - 2007-10-06

    I´m trying to install brl-cad on kubuntu 7.10 64bit from cvs, but make fails with:

    make[1]: Entering directory `/usr/src/brlcad/db'
    ../src/conv/asc2g bldg391.asc bldg391.g
    /usr/src/brlcad/src/conv/.libs/lt-asc2g: error while loading shared libraries: librt.so.19: cannot open shared object file: No such file or directory
    make[1]: *** [bldg391.g] Error 127
    make[1]: Leaving directory `/usr/src/brlcad/db'
    make: *** [all-recursive] Error 1

    What am I doing wrong?

     
    • Sean Morrison

      Sean Morrison - 2007-10-06

      Patrick,

      At a glance, it looks like something is wrong with libtool ... OR it's picking up an incompatible system librt.so and failing to find the version it wants.  It tries to run asc2g at the very end of the build, so your build should pretty much be "complete" but it's failing to run an uninstalled binary.

      Run the following and report the output:

      ls -la /usr/src/brlcad/src/librt/.libs
      locate librt.so

      Also, please report the version of libtool you're using (libtoolize --version).

      Cheers!
      Sean

       
    • Patrick

      Patrick - 2007-10-06

      Alright, ls outputs:

      total 37480
      drwxr-sr-x 2 root src     4096 2007-10-05 23:53 .
      drwxr-sr-x 5 root src    20480 2007-10-05 23:53 ..
      -rw-r--r-- 1 root src    18432 2007-10-05 23:50 bezier_2d_isect.o
      -rw-r--r-- 1 root src   112400 2007-10-05 23:50 bigE.o
      -rw-r--r-- 1 root src    24400 2007-10-05 23:50 binary_obj.o
      -rw-r--r-- 1 root src    21144 2007-10-05 23:50 bomb.o
      -rw-r--r-- 1 root src    94688 2007-10-05 23:50 bool.o
      -rw-r--r-- 1 root src    37888 2007-10-05 23:50 bundle.o
      -rw-r--r-- 1 root src    24008 2007-10-05 23:50 cmd.o
      -rwxr-xr-x 1 root src    31213 2007-10-05 23:53 comb
      -rw-r--r-- 1 root src    88280 2007-10-05 23:51 cut.o
      -rw-r--r-- 1 root src    27552 2007-10-05 23:51 db5_alloc.o
      -rw-r--r-- 1 root src    57312 2007-10-05 23:51 db5_bin.o
      -rw-r--r-- 1 root src    44456 2007-10-05 23:51 db5_comb.o
      -rw-r--r-- 1 root src    73256 2007-10-05 23:51 db5_io.o
      -rw-r--r-- 1 root src    36968 2007-10-05 23:51 db5_scan.o
      -rw-r--r-- 1 root src    15872 2007-10-05 23:51 db5_types.o
      -rw-r--r-- 1 root src    31008 2007-10-05 23:51 db_alloc.o
      -rw-r--r-- 1 root src    43704 2007-10-05 23:51 db_anim.o
      -rw-r--r-- 1 root src    58984 2007-10-05 23:51 db_comb.o
      -rw-r--r-- 1 root src    22024 2007-10-05 23:51 db_flags.o
      -rw-r--r-- 1 root src    24296 2007-10-05 23:51 db_inmem.o
      -rw-r--r-- 1 root src    37512 2007-10-05 23:51 db_io.o
      -rw-r--r-- 1 root src    37896 2007-10-05 23:51 db_lookup.o
      -rw-r--r-- 1 root src    26528 2007-10-05 23:51 db_match.o
      -rw-r--r-- 1 root src    32520 2007-10-05 23:51 db_open.o
      -rw-r--r-- 1 root src    35648 2007-10-05 23:51 db_path.o
      -rw-r--r-- 1 root src    42248 2007-10-05 23:51 db_scan.o
      -rw-r--r-- 1 root src   111248 2007-10-05 23:51 db_tree.o
      -rw-r--r-- 1 root src    31896 2007-10-05 23:51 db_walk.o
      -rw-r--r-- 1 root src   169424 2007-10-05 23:51 dg_obj.o
      -rw-r--r-- 1 root src    28408 2007-10-05 23:51 dir.o
      -rw-r--r-- 1 root src    10896 2007-10-05 23:51 dspline.o
      -rw-r--r-- 1 root src    32672 2007-10-05 23:51 fortray.o
      -rw-r--r-- 1 root src    79288 2007-10-05 23:51 g_arbn.o
      -rw-r--r-- 1 root src   127056 2007-10-05 23:51 g_arb.o
      -rw-r--r-- 1 root src    86216 2007-10-05 23:51 g_ars.o
      -rw-r--r-- 1 root src   297480 2007-10-05 23:51 g_bot.o
      -rw-r--r-- 1 root src    91736 2007-10-05 23:51 g_cline.o
      -rw-r--r-- 1 root src   267592 2007-10-05 23:51 g_dsp.o
      -rw-r--r-- 1 root src    97816 2007-10-05 23:51 g_ebm.o
      -rw-r--r-- 1 root src   108248 2007-10-05 23:51 g_ehy.o
      -rw-r--r-- 1 root src   133216 2007-10-05 23:51 g_ell.o
      -rw-r--r-- 1 root src   113184 2007-10-05 23:51 g_epa.o
      -rw-r--r-- 1 root src   114080 2007-10-05 23:51 g_eto.o
      -rw-r--r-- 1 root src   163048 2007-10-05 23:51 g_extrude.o
      -rw-r--r-- 1 root src    58944 2007-10-05 23:51 g_grip.o
      -rw-r--r-- 1 root src    68232 2007-10-05 23:51 g_half.o
      -rw-r--r-- 1 root src   143200 2007-10-05 23:51 g_hf.o
      -rw-r--r-- 1 root src    19232 2007-10-05 23:52 global.o
      -rw-r--r-- 1 root src    52176 2007-10-05 23:51 g_metaball.o
      -rw-r--r-- 1 root src   154376 2007-10-05 23:51 g_nmg.o
      -rw-r--r-- 1 root src    81792 2007-10-05 23:51 g_nurb.o
      -rw-r--r-- 1 root src   135624 2007-10-05 23:51 g_part.o
      -rw-r--r-- 1 root src    82112 2007-10-05 23:51 g_pg.o
      -rw-r--r-- 1 root src   283080 2007-10-05 23:51 g_pipe.o
      -rw-r--r-- 1 root src    51256 2007-10-05 23:51 g_rec.o
      -rw-r--r-- 1 root src   108368 2007-10-05 23:51 g_rhc.o
      -rw-r--r-- 1 root src   102064 2007-10-05 23:51 g_rpc.o
      -rw-r--r-- 1 root src   149152 2007-10-05 23:52 g_sketch.o
      -rw-r--r-- 1 root src    33032 2007-10-05 23:52 g_sph.o
      -rw-r--r-- 1 root src    66360 2007-10-05 23:52 g_submodel.o
      -rw-r--r-- 1 root src    83736 2007-10-05 23:52 g_superell.o
      -rw-r--r-- 1 root src   182752 2007-10-05 23:52 g_tgc.o
      -rw-r--r-- 1 root src   106256 2007-10-05 23:52 g_torus.o
      -rw-r--r-- 1 root src   103768 2007-10-05 23:52 g_vol.o
      -rw-r--r-- 1 root src     7672 2007-10-05 23:52 htbl.o
      -rw-r--r-- 1 root src    46224 2007-10-05 23:52 importFg4Section.o
      -rw-r--r-- 1 root src 10107840 2007-10-05 23:53 librt.a
      lrwxrwxrwx 1 root src       11 2007-10-05 23:53 librt.la -> ../librt.la
      -rw-r--r-- 1 root src      946 2007-10-05 23:53 librt.lai
      -rw-r--r-- 1 root src 10107840 2007-10-05 23:53 librt_nil.a
      lrwxrwxrwx 1 root src       15 2007-10-05 23:53 librt_nil.la -> ../librt_nil.la
      lrwxrwxrwx 1 root src       15 2007-10-05 23:53 librt.so -> librt.so.19.0.1
      lrwxrwxrwx 1 root src       15 2007-10-05 23:53 librt.so.19 -> librt.so.19.0.1
      -rwxr-xr-x 1 root src  7416407 2007-10-05 23:53 librt.so.19.0.1
      -rw-r--r-- 1 root src    24048 2007-10-05 23:52 many.o
      -rw-r--r-- 1 root src    26560 2007-10-05 23:52 mater.o
      -rw-r--r-- 1 root src    11336 2007-10-05 23:52 memalloc.o
      -rw-r--r-- 1 root src    49336 2007-10-05 23:52 mirror.o
      -rw-r--r-- 1 root src     5544 2007-10-05 23:52 mkbundle.o
      -rw-r--r-- 1 root src    36728 2007-10-05 23:52 nirt.o
      -rw-r--r-- 1 root src    73144 2007-10-05 23:52 nmg_bool.o
      -rw-r--r-- 1 root src    98992 2007-10-05 23:52 nmg_ck.o
      -rw-r--r-- 1 root src   114328 2007-10-05 23:52 nmg_class.o
      -rw-r--r-- 1 root src    43432 2007-10-05 23:52 nmg_eval.o
      -rw-r--r-- 1 root src    66416 2007-10-05 23:52 nmg_extrude.o
      -rw-r--r-- 1 root src   175904 2007-10-05 23:52 nmg_fcut.o
      -rw-r--r-- 1 root src   141944 2007-10-05 23:52 nmg_fuse.o
      -rw-r--r-- 1 root src    87144 2007-10-05 23:52 nmg_index.o
      -rw-r--r-- 1 root src   130664 2007-10-05 23:52 nmg_info.o
      -rw-r--r-- 1 root src   344312 2007-10-05 23:52 nmg_inter.o
      -rw-r--r-- 1 root src    43760 2007-10-05 23:52 nmg_manif.o
      -rw-r--r-- 1 root src    41744 2007-10-05 23:52 nmg_mesh.o
      -rw-r--r-- 1 root src   438736 2007-10-05 23:52 nmg_misc.o
      -rw-r--r-- 1 root src   128512 2007-10-05 23:52 nmg_mk.o
      -rw-r--r-- 1 root src   169368 2007-10-05 23:52 nmg_mod.o
      -rw-r--r-- 1 root src   177872 2007-10-05 23:52 nmg_plot.o
      -rw-r--r-- 1 root src    65704 2007-10-05 23:52 nmg_pr.o
      -rw-r--r-- 1 root src    75768 2007-10-05 23:52 nmg_pt_fu.o
      -rw-r--r-- 1 root src   147272 2007-10-05 23:52 nmg_rt_isect.o
      -rw-r--r-- 1 root src    67656 2007-10-05 23:52 nmg_rt_segs.o
      -rw-r--r-- 1 root src   145224 2007-10-05 23:52 nmg_tri.o
      -rw-r--r-- 1 root src    19872 2007-10-05 23:52 nmg_visit.o
      -rw-r--r-- 1 root src     4912 2007-10-05 23:52 nurb_basis.o
      -rw-r--r-- 1 root src    24816 2007-10-05 23:52 nurb_bezier.o
      -rw-r--r-- 1 root src     9888 2007-10-05 23:52 nurb_bound.o
      -rw-r--r-- 1 root src    12512 2007-10-05 23:52 nurb_c2.o
      -rw-r--r-- 1 root src    22424 2007-10-05 23:52 nurb_copy.o
      -rw-r--r-- 1 root src     8416 2007-10-05 23:52 nurb_diff.o
      -rw-r--r-- 1 root src    11680 2007-10-05 23:52 nurb_eval.o
      -rwxr-xr-x 1 root src    15826 2007-10-05 23:53 nurb_example
      -rw-r--r-- 1 root src    11680 2007-10-05 23:52 nurb_flat.o
      -rw-r--r-- 1 root src    10208 2007-10-05 23:52 nurb_interp.o
      -rw-r--r-- 1 root src    29392 2007-10-05 23:52 nurb_knot.o
      -rw-r--r-- 1 root src    15176 2007-10-05 23:52 nurb_norm.o
      -rw-r--r-- 1 root src     9560 2007-10-05 23:52 nurb_plot.o
      -rw-r--r-- 1 root src     6776 2007-10-05 23:52 nurb_poly.o
      -rw-r--r-- 1 root src    37720 2007-10-05 23:52 nurb_ray.o
      -rw-r--r-- 1 root src    24712 2007-10-05 23:52 nurb_refine.o
      -rw-r--r-- 1 root src     5176 2007-10-05 23:52 nurb_reverse.o
      -rw-r--r-- 1 root src    10920 2007-10-05 23:52 nurb_solve.o
      -rw-r--r-- 1 root src    28728 2007-10-05 23:52 nurb_split.o
      -rw-r--r-- 1 root src     8856 2007-10-05 23:53 nurb_tess.o
      -rw-r--r-- 1 root src    22616 2007-10-05 23:53 nurb_trim.o
      -rw-r--r-- 1 root src     4952 2007-10-05 23:53 nurb_trim_util.o
      -rw-r--r-- 1 root src    32408 2007-10-05 23:53 nurb_util.o
      -rw-r--r-- 1 root src    11456 2007-10-05 23:53 nurb_xsplit.o
      -rw-r--r-- 1 root src    24888 2007-10-05 23:53 oslo_calc.o
      -rw-r--r-- 1 root src     4528 2007-10-05 23:53 oslo_map.o
      -rw-r--r-- 1 root src    82456 2007-10-05 23:53 prep.o
      -rw-r--r-- 1 root src    55512 2007-10-05 23:53 pr.o
      -rw-r--r-- 1 root src    45864 2007-10-05 23:53 qray.o
      -rw-r--r-- 1 root src    24416 2007-10-05 23:53 regionfix.o
      -rw-r--r-- 1 root src    13168 2007-10-05 23:53 roots.o
      -rw-r--r-- 1 root src    85440 2007-10-05 23:53 shoot.o
      -rw-r--r-- 1 root src    17344 2007-10-05 23:53 spectrum.o
      -rw-r--r-- 1 root src    21304 2007-10-05 23:53 storage.o
      -rw-r--r-- 1 root src   103752 2007-10-05 23:53 table.o
      -rw-r--r-- 1 root src    90968 2007-10-05 23:53 tcl.o
      -rw-r--r-- 1 root src    14064 2007-10-05 23:53 timer42.o
      -rw-r--r-- 1 root src    67400 2007-10-05 23:53 track.o
      -rw-r--r-- 1 root src    21384 2007-10-05 23:53 transform.o
      -rw-r--r-- 1 root src    64624 2007-10-05 23:53 tree.o
      -rw-r--r-- 1 root src    43328 2007-10-05 23:53 vdraw.o
      -rw-r--r-- 1 root src     7792 2007-10-05 23:53 vers.o
      -rw-r--r-- 1 root src   124592 2007-10-05 23:53 view_obj.o
      -rw-r--r-- 1 root src    74680 2007-10-05 23:53 vlist.o
      -rw-r--r-- 1 root src    44424 2007-10-05 23:53 wdb_comb_std.o
      -rw-r--r-- 1 root src    31480 2007-10-05 23:53 wdb.o
      -rw-r--r-- 1 root src   426520 2007-10-05 23:53 wdb_obj.o

      And then locate librt.so:

      /lib/librt.so.1
      /lib32/librt.so.1
      /usr/lib/librt.so

      I have libtoolize 1.5.24

      Thanks for the help!

       
      • Sean Morrison

        Sean Morrison - 2007-10-09

        Yeah, off the cuff, it looks like that system librt.so is getting in the way and getting linked in.  That in turn causes the mass of unresolved symbols during compilation.  There are a handful of linkage flags that you can likely pass to the compiler that will help it ignore your installed libraries, but it's probably even easier to just move them out of the way temporarily.  Try running:

        mv /lib/librt.so.1 /lib/librt.disabled.1
        mv /lib32/librt.so.1 /lib32/librt.disabled.1
        mv /usr/lib/librt.so /usr/lib/librt.disabled

        Then try the compile again.  If it completes the build, then you can move the files back with the reverse move.  If it still fails, then it'd sound like there's something else going on.  Let me know what you find out.  Might help others if it's a common problem.

        Cheers!
        Sean

         
    • Patrick

      Patrick - 2007-10-12

      I tried renaming the files, and now make won't run:

      make: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory

       
      • Sean Morrison

        Sean Morrison - 2007-10-12

        gah, so a bit of a catch-22.  Can't link because you have system librt files in the way, can't remove them because you've got apps you're using that are linked against them (though why make would be linked against a deprecated real-time library is beyond me).

        Well, that sort of limits the options available.  You sould of course restore the mv'd files back to their previous names so make will work.

        Next thing to try is to unset your LD_LIBRARY_PATH if you have it set (unset LD_LIBRARY_PATH) and/or manually set LD_LIBRARY_PATH during make:

        LD_LIBRARY_PATH=/usr/src/brlcad/src/librt/.libs make

        Cheers!
        Sean

         
    • Patrick

      Patrick - 2007-10-22

      Okay, setting LD_LIBRARY_PATH manually did allow brlcad to compile ( I ended up having to add libbn and libbu also ), but running make test fails:

      /bin/sh ../regress/solids.sh ..
      rendering solids...
      raytrace failed
      make[1]: [solids] Error 1 (ignored)
      +++ solids test complete.
      /bin/sh ../regress/shaders.sh ..
      rendering shaders...
      shaders raytrace failed
      make[1]: [shaders] Error 1 (ignored)
      +++ shaders test complete.
      /bin/sh ../regress/spdi.sh ..
      rendering...
      spdi.pix off by many
      -> spdi.sh FAILED
      +++ spdi test complete.
      /bin/sh ../regress/moss.sh ..
      /usr/src/brlcad/src/conv/.libs/lt-asc2g: error while loading shared libraries: librt.so.19: cannot open shared object file: No such file or directory
      rendering moss...
      raytrace failed
      /usr/src/brlcad/src/util/.libs/lt-pix-png: error while loading shared libraries: libbu.so.19: cannot open shared object file: No such file or directory
      /usr/src/brlcad/src/util/.libs/lt-png-pix: error while loading shared libraries: libbu.so.19: cannot open shared object file: No such file or directory
      moss.pix off by many
      -> moss.sh FAILED
      +++ moss test complete.
      /bin/sh ../regress/lights.sh ..
      /usr/src/brlcad/src/conv/.libs/lt-asc2g: error while loading shared libraries: librt.so.19: cannot open shared object file: No such file or directory
      rendering lights...
      lights.pix off by many
      -> lights.sh FAILED
      +++ lights test complete.
      /bin/sh ../regress/iges.sh ..
      g-iges/iges-g FAILED
      g-iges/iges-g FAILED
      -> iges.sh FAILED
      exit: 51: Illegal number: -1
      make[1]: [iges] Error 2 (ignored)
      +++ iges test complete.
      /bin/sh ../regress/weight.sh ..
      ../regress/weight.sh: 67: cannot open weight.out: No such file
      cmp: EOF on weight.out_ns
      rtweight results differ 1
      -> weight.sh FAILED
      make[1]: [weight] Error 1 (ignored)
      +++ weight test complete.
      /bin/sh ../regress/gqa.sh
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -Ao gqa.g overlaps
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -Ae gqa.g exposed_air.g
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -Aa gqa.g adj_air.g
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -Ag gqa.g gap.g
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -Av -v gqa.g closed_box.r
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -r -Aw -v gqa.g closed_box.r
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -r -Avw gqa.g solid_box.r
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -r -Avw gqa.g adj_air.g
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -r -v -g 0.25m-25mm -Awo gqa.g closed_box.r
      ../src/gtools/g_qa -u m,m^3,kg -g 0.25m-0.5mm -p -g 50mm -Ao gqa.g closed_box.r
      -> gqa.sh succeeded
      +++ gqa test complete.
      /bin/sh ../regress/flawfinder.sh ..
      running flawfinder...
      Flawfinder version 1.27, (C) 2001-2004 David A. Wheeler.
      Number of dangerous functions in C/C++ ruleset: 160
      Traceback (most recent call last):
        File "../misc/flawfinder", line 1863, in <module>
          flawfind()
        File "../misc/flawfinder", line 1857, in flawfind
          if process_files():
        File "../misc/flawfinder", line 1713, in process_files
          process_file_args(files, patch_infos)
        File "../misc/flawfinder", line 1522, in process_file_args
          maybe_process_file(f, patch_infos)
        File "../misc/flawfinder", line 1473, in maybe_process_file
          maybe_process_file(os.path.join(f, file), patch_infos)
        File "../misc/flawfinder", line 1473, in maybe_process_file
          maybe_process_file(os.path.join(f, file), patch_infos)
        File "../misc/flawfinder", line 1473, in maybe_process_file
          maybe_process_file(os.path.join(f, file), patch_infos)
        File "../misc/flawfinder", line 1473, in maybe_process_file
          maybe_process_file(os.path.join(f, file), patch_infos)
        File "../misc/flawfinder", line 1493, in maybe_process_file
          process_c_file(f, patch_infos)
        File "../misc/flawfinder", line 1303, in process_c_file
          c = text[i]
      IndexError: string index out of range
      -> flawfinder.sh FAILED
      +++ flawfinder test complete.
      ---
      Regression testing completed.

       
      • Sean Morrison

        Sean Morrison - 2007-10-22

        All of those errors (except for the flawfinder one) are related to LD_LIBRARY_PATH issues on uninstalled binaries.  Best would be to install BRL-CAD before running make test in your situation so that it finds all of the libraries during make test.  There are other ways to test the installation/compilation as well such as running /usr/brlcad/bin/benchmark to run the benchmark suite and running /usr/brlcad/bin/mged to get the GUI solid geometry editor.  If those both succeed, then you've almost guaranteed got a good install (barring any usual bugs or issues).  Glad to hear you've made some progress!

        Cheers!
        Sean

         
    • Patrick

      Patrick - 2007-10-22

      It's almost working now.. I installed then ran the benchmark which went well, but mged won't run. It aborts with the following:

      Initializing and backgrounding, please wait...Done
      root@pdesk1:/usr/brlcad/lib/tk8.5# Can't find a usable tk.tcl in the following directories:
          /usr/brlcad/lib/tk8.5

      /usr/brlcad/lib/tk8.5/tk.tcl: version conflict for package "Tcl": have 8.5b1, need exactly 8.5a6
      version conflict for package "Tcl": have 8.5b1, need exactly 8.5a6
          while executing
      "package require -exact Tcl 8.5a6"
          (file "/usr/brlcad/lib/tk8.5/tk.tcl" line 16)
          invoked from within
      "source /usr/brlcad/lib/tk8.5/tk.tcl"
          ("uplevel" body line 1)
          invoked from within
      "uplevel #0 [list source $file]"

      This probably means that tk wasn't installed properly.

      MGED Aborted.

      I tried changing tk.tcl to require 8.5b1, but then mged just tells me I have 8.5a6 and need 8.5b1. I would just install Tcl/Tk 8.5a6, but I'm not sure where to find it.

       
    • Patrick

      Patrick - 2007-10-22

      Nevermind the above post.

      I commented out the lines requiring version 8.5a6 ( don't know why doing so didn't occur to me before ), and now mged seems to be running fine.

      Anyway, thank you for helping me get this working.

       

Log in to post a comment.