LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 04-12-2007, 04:14 AM   #1
dourk
LQ Newbie
 
Registered: Jul 2006
Posts: 21

Rep: Reputation: 0
make won't run: make[2]: *** [udunits] Error 1


Hi everyone

I'm using SUSE 10.0 and trying to install udunits, it's a library that I need in order to run a fortran code. Configure runs smoothly (or so I think) but make won't run.

Here's all my output. From ./configure:

kostas@linux:~/utils/udunits/udunits-1.12.4/src> ./configure
checking for manual-page index command...
checking for c89... no
checking for cc... cc
checking type of operating system... linux
checking for dependency generation mechanism... cc -M
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking the C preprocessor... works
checking for C const... yes
checking for C volatile... yes
checking for C signed... yes
checking for C function prototypes... yes
checking for standard C variadic functions... yes
checking for standard C string generation... yes
checking for standard C token pasting... yes
checking C void pointer... yes
checking for ar... ar
checking for tar flags... -chof
checking for ranlib... ranlib
checking binary distribution directory... /home/ftp/pub/binary/dummy_system
checking the installation prefix... /home/kostas/utils/udunits/udunits-1.12.4
checking the installation exec-prefix... /home/kostas/utils/udunits/udunits-1.12.4
checking for neqn... neqn
checking for tbl... tbl
checking for ar... (cached) ar
checking for C math library...
checking for return sin(0.0) != 0 in default library(s)... yes
checking style for cfortran.h... Standard
checking for Fortran integer type equivalent to C pointer... integer*4
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking C header file <stddef.h> for typedef size_t... declared
checking for stddef.h... (cached) yes
checking C header file <stddef.h> for typedef ptrdiff_t... declared
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for stdlib.h... (cached) yes
checking C header file <stdlib.h> for typedef size_t... declared
checking for atexit... yes
checking for stdlib.h... (cached) yes
checking C header file <stdlib.h> for function atexit()... declared
checking for getenv... yes
checking for stdlib.h... (cached) yes
checking C header file <stdlib.h> for function getenv()... declared
checking for string.h... (cached) yes
checking C header file <string.h> for typedef size_t... declared
checking for strerror... yes
checking for string.h... (cached) yes
checking C header file <string.h> for function strerror()... declared
checking for string.h... (cached) yes
checking C header file <string.h> for function strchr()... declared
checking for string.h... (cached) yes
checking C header file <string.h> for function strcpy()... declared
checking for string.h... (cached) yes
checking C header file <string.h> for function strrchr()... declared
checking for string.h... (cached) yes
checking C header file <string.h> for function strncpy()... declared
checking for string.h... (cached) yes
checking C header file <string.h> for function strtok()... declared
checking for strstr... yes
checking for string.h... (cached) yes
checking C header file <string.h> for function strstr()... declared
checking for memmove... yes
checking for string.h... (cached) yes
checking C header file <string.h> for function memmove()... declared
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking C header file <time.h> for typedef time_t... declared
checking for time.h... (cached) yes
checking C header file <time.h> for typedef size_t... declared
checking for difftime... yes
checking for time.h... (cached) yes
checking C header file <time.h> for function difftime()... declared
checking for strftime... yes
checking for time.h... (cached) yes
checking C header file <time.h> for function strftime()... declared
checking search.h usability... yes
checking search.h presence... yes
checking for search.h... yes
checking C header file <search.h> for typedef ENTRY... declared
checking for search.h... (cached) yes
checking C header file <search.h> for typedef ACTION... declared
checking for search.h... (cached) yes
checking C header file <search.h> for typedef VISIT... declared
checking for tsearch... yes
checking for search.h... (cached) yes
checking C header file <search.h> for function tsearch()... declared
checking for tfind... yes
checking for search.h... (cached) yes
checking C header file <search.h> for function tfind()... declared
checking for tdelete... yes
checking for search.h... (cached) yes
checking C header file <search.h> for function tdelete()... declared
checking for twalk... yes
checking for search.h... (cached) yes
checking C header file <search.h> for function twalk()... declared
checking for perl... perl
checking for type of perl executable to create... dynamic
checking for position-independent compilation flags... ''
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating lib/udunits.inc
config.status: creating udunits/Makefile
config.status: creating perl/Makefile.PL
config.status: creating port/master.mk
config.status: creating port/Makefile
config.status: creating port/misc/Makefile
config.status: creating port/cfortran/Makefile
config.status: creating port/misc/udposix.h
config.status: executing default commands
expanding `include's in file `Makefile'
expanding `include's in file `lib/Makefile'
expanding `include's in file `lib/udunits.inc'
expanding `include's in file `udunits/Makefile'
expanding `include's in file `perl/Makefile.PL'
expanding `include's in file `port/master.mk'
expanding `include's in file `port/Makefile'
expanding `include's in file `port/misc/Makefile'
expanding `include's in file `port/cfortran/Makefile'



...and from make:

kostas@linux:~/utils/udunits/udunits-1.12.4/src> make

making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/port

make[1]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port'

making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/port/misc

make[2]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/misc'
cc -c -g -O2 -I. -D_REENTRANT -Df2cFortran uddummy.c
ar rcuv libudport.a uddummy.o
a - uddummy.o
case "" in \
'') ;; \
*) ar rucv libudport.a ;; \
esac
ranlib libudport.a
make[2]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/misc'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src/port


making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/port/cfortran

make[2]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/cfortran'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/cfortran'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src/port

make[1]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src


making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/lib

make[1]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/lib'
ln -s ../port/misc/udalloc.c .
ln -s ../port/misc/udalloc.h .
cc -c -g -O2 -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/kostas/utils/udunits/udunits-1.12.4/etc/udunits.dat"' -Df2cFortran utlib.c
utlib.c: In function ‘utInit’:
utlib.c:1127: warning: passing argument 1 of ‘ReadUnits’ discards qualifiers from pointer target type
cc -c -g -O2 -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/kostas/utils/udunits/udunits-1.12.4/etc/udunits.dat"' -Df2cFortran utparse.c
cc -c -g -O2 -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/kostas/utils/udunits/udunits-1.12.4/etc/udunits.dat"' -Df2cFortran utscan.c
cc -c -g -O2 -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/kostas/utils/udunits/udunits-1.12.4/etc/udunits.dat"' -Df2cFortran udalloc.c
ar rcuv libudunits.a utlib.o utparse.o utscan.o udalloc.o
a - utlib.o
a - utparse.o
a - utscan.o
a - udalloc.o
case "" in \
'') ;; \
*) ar rucv libudunits.a ;; \
esac
ranlib libudunits.a
make[1]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/lib'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src


making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/udunits

make[1]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/udunits'
make[2]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/udunits'
cc -c -g -O2 -I../lib -I../port/misc -Df2cFortran udunits.c
udunits.c: In function ‘main’:
udunits.c:113: warning: incompatible implicit declaration of built-in function ‘exit’
cc -o udunits -g -O2 udunits.o -L/home/kostas/utils/udunits/udunits-1.12.4/src/lib -ludunits -L/home/kostas/utils/udunits/udunits-1.12.4/src/port/misc -ludport
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function `decomp':
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/utlib.c:366: undefined reference to `fmod'
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function `utRaise':
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/utlib.c:807: undefined reference to `pow'
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function `utPrint':
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/utlib.c:1298: undefined reference to `log10'
collect2: ld returned 1 exit status
make[2]: *** [udunits] Error 1
make[2]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/udunits'
make[1]: *** [program] Error 2
make[1]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/udunits'
make: *** [udunits/all] Error 1

What do you make of this?
 
Old 04-12-2007, 11:43 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 488

Rep: Reputation: 58
Quote:
Originally Posted by dourk
cc -o udunits -g -O2 udunits.o -L/home/kostas/utils/udunits/udunits-1.12.4/src/lib -ludunits -L/home/kostas/utils/udunits/udunits-1.12.4/src/port/misc -ludport
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function `decomp':
/home/kostas/utils/udunits/udunits-1.12.4/src/lib/utlib.c:366: undefined reference to `fmod'
The 'fmod' function requires -lm on the command line line (or so says 'man fmod'), but it's not there.

That's very odd. The packager should be responsible to put all required libraries in place. I don't know if this will work, but you might put LDFLAGS=-lm on the command line of configure.

Or else run configure --help | less and see if there is an option to fix this, maybe --with-math or similar.
 
Old 04-13-2007, 05:44 AM   #3
dourk
LQ Newbie
 
Registered: Jul 2006
Posts: 21

Original Poster
Rep: Reputation: 0
Thank you very much for responding Ken

I have to admit that if I am a newbie now then when I took "control" of my computer I was an ultimate newbie. Of course I always tried to act with safety but you never know, so it's possible that I have mixed up some settings of the poor machine and maybe that's why I have problems now

Anyway I tryied to follow your instructions (configure-help and LDFLAGS=-lm) and this way produced another long post My sincere apologies

1) This is what I got from
./configure --help| less

`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']

Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]

Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>
CPP C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.


LDFLAGS is mentioned but (call me a newbie) it gives me no hint at all

2) I also tried typing
LDFLAGS=-lm
in the command line before configure and make

This caused no change at all to the output of ./configure but it did change the output of make:

kostas@linux:~/utils/udunits/udunits-1.12.4/src> make

making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/port

make[1]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port'

making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/port/misc

make[2]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/misc'
cc -c -g -O2 -I. -D_REENTRANT uddummy.c
ar rcuv libudport.a uddummy.o
a - uddummy.o
case "" in \
'') ;; \
*) ar rucv libudport.a ;; \
esac
ranlib libudport.a
make[2]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/misc'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src/port


making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/port/cfortran

make[2]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/cfortran'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port/cfortran'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src/port

make[1]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/port'

returning to directory /home/kostas/utils/udunits/udunits-1.12.4/src


making `all' in directory /home/kostas/utils/udunits/udunits-1.12.4/src/lib

make[1]: Entering directory `/home/kostas/utils/udunits/udunits-1.12.4/src/lib'
ln -s ../port/misc/udalloc.c .
ln -s ../port/misc/udalloc.h .
cc -c -g -O2 -I../port/misc -I../port/cfortran -DUT_DEFAULT_PATH='"/home/kostas/utils/udunits/udunits-1.12.4/etc/udunits.dat"' utlib.c
In file included from utlib.c:29:
../port/cfortran/cfortran.h:132:3: error: #error "cfortran.h: Can't find your environment among: - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 - VAX VMS CC 3.1 and FORTRAN 5.4. - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. - CRAY - NEC SX-4 SUPER-UX - CONVEX - Sun - PowerStation Fortran with Visual C++ - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 - LynxOS: cc or gcc with f2c. - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. - f77 with vcc works; but missing link magic for f77 I/O. - NO fort. None of gcc, cc or vcc generate required names. - f2c : Use #define f2cFortran, or cc -Df2cFortran - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran - Absoft Pro Fortran: Use #define AbsoftProFortran - Portland Group Fortran: Use #define pgiFortran"
make[1]: *** [utlib.o] Error 1
make[1]: Leaving directory `/home/kostas/utils/udunits/udunits-1.12.4/src/lib'
make: *** [lib/all] Error 1


Any other ideas anybody?
 
Old 04-13-2007, 06:14 AM   #4
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 488

Rep: Reputation: 58
Well 'configure --help' was worth trying because some packages add special switches for special circumstances, but the output you listed is just the standard boiler-plate stuff.

I don't see 'LDFLAGS=-lm' in the listing, but it is different, which probably means that it worked and then the build continued on the the next problem.

Quote:
In file included from utlib.c:29:
../port/cfortran/cfortran.h:132:3: error: #error "cfortran.h: Can't find your environment among: - MIPS cc ...
Apparently file cfortran.h has a bunch of #ifdef statements where it is trying to figure out what operating system and compiler you are using. It didn't find what it was looking for so it executed the last option--an #error statement that spits out an error message and quits.

I guess you are not running IBM AIX, VAX VMS, NEC SX-4 SUPER-UX or any of the others. I don't see anything very encouraging in that list. And I'm not familiar with any of those environments.

You could experiment with passing CPPFLAGS=-Df2cFortran or CPPFLAGS=-DNAGf90Fortran to configure (in addition to LDFLAGS) to see if your environment is close enough. Otherwise you might need to edit the source.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a simple script and make it run on bootup?? coolblue Programming 5 12-18-2006 09:55 PM
make bzImage failure: make[1]: *** [init/version.o] Error 1 nmainak Linux - Kernel 2 07-16-2006 05:06 PM
Error in gcc while trying to run make TheBelush Linux - Newbie 3 01-23-2005 12:34 AM
lopster v1.2.2 make error: No rule to make target `m4/glibc21.m4' Kropotkin Fedora 0 10-31-2004 11:19 AM
make: cc: command not found make: *** [gzip.o]error 127 zyjk Linux - Newbie 5 02-08-2002 09:58 AM


All times are GMT -5. The time now is 05:31 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration