#1 Some programs in "utils" module don't compile

closed-fixed
nobody
None
5
2004-08-12
2004-07-21
David Costanzo
No

On GNU/Linux with GCC 3.3.3, there are a few utilities
in the "utils" module that don't compile (from CVS).
Here are the error messages.

mesh2map

"knoppix@box:~/temp/oq/cvs/utils/mesh2map$ make
cc -o ../bin/mesh2map -O2 -Wall -W mesh2map.c
mesh2map.c: In function `clean_up':
mesh2map.c:92: warning: control reaches end of non-void
function
mesh2map.c: In function `write_brush':
mesh2map.c:396: warning: control reaches end of
non-void function
mesh2map.c: In function `convert':
mesh2map.c:446: warning: too many arguments for format
mesh2map.c:403: warning: `m' might be used
uninitialized in this
function
mesh2map.c:404: warning: `materials' might be used
uninitialized in
this
function
mesh2map.c: In function `main':
mesh2map.c:641: warning: unused variable `count'
/tmp/ccfpsRhx.o(.text+0x1bd): In function `get_normal':
: undefined reference to `sqrt'
/tmp/ccfpsRhx.o(.text+0xc7f): In function `write_brush':
: undefined reference to `asin'
/tmp/ccfpsRhx.o(.text+0xcdf): In function `write_brush':
: undefined reference to `asin'
/tmp/ccfpsRhx.o(.text+0xe97): In function `write_brush':
: undefined reference to `asin'
/tmp/ccfpsRhx.o(.text+0x1078): In function `write_brush':
: undefined reference to `sqrt'
/tmp/ccfpsRhx.o(.text+0x114d): In function `write_brush':
: undefined reference to `sqrt'
/tmp/ccfpsRhx.o(.text+0x1172): In function `write_brush':
: undefined reference to `sqrt'
/tmp/ccfpsRhx.o(.text+0x118f): In function `write_brush':
: undefined reference to `sqrt'
/tmp/ccfpsRhx.o(.text+0x1256): In function `write_brush':
: undefined reference to `sqrt'
/tmp/ccfpsRhx.o(.text+0x1272): more undefined
references to `sqrt'
follow
collect2: ld returned 1 exit status
make: *** [../bin/mesh2map] Fehler 1"

mdl2map:

knoppix@box:~/temp/oq/cvs/utils/mdl2map$ make
gcc -o ../bin/mdl2map main.o mdl.o map.o csendian.o
main.o(.eh_frame+0x12): undefined reference to
`__gxx_personality_v0'
mdl.o(.text+0x193): In function `Mdl::~Mdl [in-charge
deleting]()':
: undefined reference to `operator delete(void*)'
mdl.o(.text+0x1e3): In function `Mdl::setError(char*)':
: undefined reference to `operator delete(void*)'
mdl.o(.text+0x4ad): In function `Mdl::ReadMDLFile(char*)':
: undefined reference to `operator new[](unsigned)'
mdl.o(.text+0x536): In function `Mdl::ReadMDLFile(char*)':
: undefined reference to `operator new[](unsigned)'
mdl.o(.text+0x550): In function `Mdl::ReadMDLFile(char*)':
: undefined reference to `operator new[](unsigned)'
mdl.o(.text+0x5db): In function `Mdl::ReadMDLFile(char*)':
: undefined reference to `operator new[](unsigned)'
mdl.o(.text+0x676): In function `Mdl::ReadMDLFile(char*)':
: undefined reference to `operator new[](unsigned)'
mdl.o(.text+0x6b0): more undefined references to `operator
new[](unsigned)' follow
mdl.o(.gnu.linkonce.d._ZTI3Mdl+0x0): undefined
reference to `vtable for
__cxxabiv1::__class_type_info'
mdl.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
map.o(.text+0x4a): In function `WriteMAP(char*, Mdl,
float, float,
float, float, float)':
: undefined reference to `operator new[](unsigned)'
map.o(.text+0xd7): In function `WriteMAP(char*, Mdl,
float, float,
float, float, float)':
: undefined reference to `operator new[](unsigned)'
map.o(.text+0xf0): In function `WriteMAP(char*, Mdl,
float, float,
float, float, float)':
: undefined reference to `operator new[](unsigned)'
map.o(.text+0x22d): In function `WriteMAP(char*, Mdl,
float, float,
float, float, float)':
: undefined reference to `operator new[](unsigned)'
map.o(.text+0x254): In function `WriteMAP(char*, Mdl,
float, float,
float, float, float)':
: undefined reference to `operator new[](unsigned)'
map.o(.text+0x471): more undefined references to `operator
new[](unsigned)' follow
map.o(.eh_frame+0x12): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
make: *** [../bin/mdl2map] Fehler 1

raw2map

knoppix@box:~/temp/oq/cvs/utils/raw2map$ gcc -Wall
raw2map.c
raw2map.c: In function `write_block':
raw2map.c:72: warning: control reaches end of non-void
function
raw2map.c: In function `convert':
raw2map.c:148: warning: int format, long int arg (arg 2)
raw2map.c: In function `main':
raw2map.c:407: warning: implicit declaration of
function `strncasecmp'
/tmp/ccLwXY5q.o(.text+0xa45): In function `convert':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status

toon

knoppix@box:~/temp/oq/cvs/utils/toon$ gcc -Wall toon.c
toon.c: In function `clean_up':
toon.c:79: warning: control reaches end of non-void
function
toon.c: In function `write_outline_mesh':
toon.c:180: warning: control reaches end of non-void
function
toon.c: In function `convert':
toon.c:237: warning: too many arguments for format
/tmp/ccq1gCCR.o(.text+0x7a0): In function
`write_outline_mesh':
: undefined reference to `sqrt'
/tmp/ccq1gCCR.o(.text+0x993): In function
`write_outline_mesh':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status

Discussion

  • David Costanzo
    David Costanzo
    2004-07-21

    A top-level makefile for the "utils" module

     
    Attachments
  • David Costanzo
    David Costanzo
    2004-07-21

    makefile for the "toon" utilitiy

     
    Attachments
  • David Costanzo
    David Costanzo
    2004-07-21

    makefile for the tri2map utility

     
    Attachments
  • David Costanzo
    David Costanzo
    2004-07-21

    makefile for the "raw2map" utility

     
    Attachments
  • David Costanzo
    David Costanzo
    2004-07-21

    revised patch for getting the utilities to build again

     
    Attachments
  • David Costanzo
    David Costanzo
    2004-07-21

    Logged In: YES
    user_id=109252

    Instructions on using the attachments:

    Download the makefiles into the proper directory indicated
    by the attachment description. Download build-again2.patch
    into the utils module and run the following command:

    patch -p0 < build-again2.patch

    Now, running "gmake" in the "utils" directory should build
    everything except dputils, which looks like it's missing a
    "common" include directory.

    I apologize for having so many attachments. I don't know
    how to build a patch that adds files. In retrospect, I
    should have just uploaded a single tarball. Live and learn.

    Note that I deleted my original patch, "build-again.patch",
    because it did not take into account that "utils/bin" might
    not exist.

     
  • Toddd
    Toddd
    2004-07-22

    • status: open --> closed
     
  • Toddd
    Toddd
    2004-07-22

    Logged In: YES
    user_id=672646

    Thanks for the patches

     
  • David Costanzo
    David Costanzo
    2004-08-12

    • status: closed --> closed-fixed