make fails
Hi Zeno,
Three weeks ago, you created a ticket on our database about the following problem:
sudo make j2
Makefile:185: *** missing separator. Stop.
Does lm_sensors 2.8.0 still do that? We would want to close the ticket if you finally found a solution.
Thanks.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Hi Jean
Thanks for your Mail. Was on holiday for two weeks thats why no reply from my side so far.
Yes, please close that bug, I managed to compile now.
Thanks for your time and help.
Zeno
Quoted 18 lines · On Tue, 22 Jul 2003 16:53:59 +0200 Jean Delvare <[email protected]> wrote:
Hi Zeno,
Three weeks ago, you created a ticket on our database about the following problem:
sudo make j2
Makefile:185: *** missing separator. Stop.Does
lm_sensors2.8.0 still do that? We would want to close the ticket if you finally found a solution.Thanks.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Signature · 8 lines
Mit freundlichen Gruessen / Best regards Zeno Davatz Strategie und Akquisition +41 1 350 85 86 www.ywesee.com > intellectual capital connected > www.generika.cc
Quoted 5 lines
Thanks for your Mail. Was on holiday for two weeks thats why no reply from my side so far.
Yes, please close that bug, I managed to compile now.
Anything we should add to the ticket (how you solve the problem...)? The tickets are also meant for the other users who could encounter the same problem.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
As far as I can remember (after my holidays ;-) there where no Tabs somewhere around line 178 in the CVS-Code. I had to insert the Tabs for the spaces manually on two lines and then I tink everything worked...
best regards
Zeno
Quoted 14 lines · On Wed, 30 Jul 2003 13:51:44 +0200 Jean Delvare <[email protected]> wrote:
Quoted 5 lines
Thanks for your Mail. Was on holiday for two weeks thats why no reply from my side so far.
Yes, please close that bug, I managed to compile now.
Anything we should add to the ticket (how you solve the problem...)? The tickets are also meant for the other users who could encounter the same problem.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Signature · 8 lines
Mit freundlichen Gruessen / Best regards Zeno Davatz Strategie und Akquisition +41 1 350 85 86 www.ywesee.com > intellectual capital connected > www.generika.cc
Quoted 5 lines
As far as I can remember (after my holidays ;-) there where no Tabs somewhere around line 178 in the CVS-Code. I had to insert the Tabs for the spaces manually on two lines and then I tink everything worked...
OK for this one, I closed it.
I see you have another, older ticket still unresolved:
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket91
What about this one? Did you find a solution at that time, do you remember what it was?
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 6 lines · On Wed, 30 Jul 2003 14:27:27 +0200 Jean Delvare <[email protected]> wrote:
Quoted 5 lines
As far as I can remember (after my holidays ;-) there where no Tabs somewhere around line 178 in the CVS-Code. I had to insert the Tabs for the spaces manually on two lines and then I tink everything worked...
Quoted 7 lines
OK for this one, I closed it.
I see you have another, older ticket still unresolved:
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket91What about this one? Did you find a solution at that time, do you remember what it was?
Sorry, did not have time yet to check this one again. Will let you know as soon as possible. As far as I know my lm-sensors on my Mac are not yet working.
Ok?
Zeno
Quoted 6 lines · On Wed, 30 Jul 2003 14:27:27 +0200 Jean Delvare <[email protected]> wrote:
Quoted 5 lines
As far as I can remember (after my holidays ;-) there where no Tabs somewhere around line 178 in the CVS-Code. I had to insert the Tabs for the spaces manually on two lines and then I tink everything worked...
Quoted 7 lines
OK for this one, I closed it.
I see you have another, older ticket still unresolved:
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket91What about this one? Did you find a solution at that time, do you remember what it was?
Ok, I need to recompile my kernel and then I will get back to you.
Zeno
Quoted 6 lines · On Wed, 30 Jul 2003 14:27:27 +0200 Jean Delvare <[email protected]> wrote:
Quoted 5 lines
As far as I can remember (after my holidays ;-) there where no Tabs somewhere around line 178 in the CVS-Code. I had to insert the Tabs for the spaces manually on two lines and then I tink everything worked...
Quoted 7 lines
OK for this one, I closed it.
I see you have another, older ticket still unresolved:
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket91What about this one? Did you find a solution at that time, do you remember what it was?
Ok, recompiled. i2c installs great but lm-sensors gives me:
In file included from lib/data.c:20:/usr/include/stdlib.h:445: error: parse error before "int32_t" /usr/include/stdlib.h:447: error: parse error before '*' token /usr/include/stdlib.h:451: error: parse error before '*' token /usr/include/stdlib.h:452: error: parse error before '}' token /usr/include/stdlib.h:455: error: parse error before "int32_t"
make: *** [lib/data.ao] Fehler 1
this ticket can be expanded to this error - or shall I open a new one?
Thanks for your Feedback.
Zeno
Quoted 10 lines
Ok, recompiled. i2c installs great but lm-sensors gives me:
In file included from
lib/data.c:20:/usr/include/stdlib.h:445: error: parse error before "int32_t"/usr/include/stdlib.h:447: error: parse error before '*' token/usr/include/stdlib.h:451: error: parse error before '*' token/usr/include/stdlib.h:452: error: parse error before '}' token/usr/include/stdlib.h:455: error: parse error before "int32_t"
make: *** [lib/data.ao] Fehler 1
Mmmh, doesn't sound like our fault. The error is in a system header. This should *not* happen. I guess you would be unable to compile most software, not only lm_sensors. It happens that i2c doesn't use this header (that's why you succeeded), but lm_sensors use it many times, so you won't get it to compile unless you can fix this.
Quoted 1 line
this ticket can be expanded to this error - or shall I open a new one?
Neither. I feel like it's not related to the old problem nor even to lm_sensors, so no place for a ticket.
But I could be wrong. I would like you to try to compile some other program that uses stdlib.h. If you succeed, then lm_sensors must be wrong somewhere. In this case, I'd like you to send us the line that produces the error (the error itself isn't very useful without the "gcc -I. -Ikernel/include ..." line that produced it.)
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 6 lines · On Wed, 30 Jul 2003 16:07:39 +0200 Jean Delvare <[email protected]> wrote:
Mmmh, doesn't sound like our fault. The error is in a system header. This should *not* happen. I guess you would be unable to compile most software, not only
lm_sensors. It happens that i2c doesn't use this header (that's why you succeeded), butlm_sensorsuse it many times, so you won't get it to compile unless you can fix this.
Quoted 7 lines
Quoted 1 line
this ticket can be expanded to this error - or shall I open a new one?
Neither. I feel like it's not related to the old problem nor even to
lm_sensors, so no place for a ticket.But I could be wrong. I would like you to try to compile some other program that uses
stdlib.h.
What program would that be? I do know of any on the top of my mind.
If you succeed, then lm_sensors must be
Quoted 3 lines
wrong somewhere. In this case, I'd like you to send us the line that produces the error (the error itself isn't very useful without the "gcc -I. -Ikernel/include ..." line that produced it.)
Well, as I just said I recompiled my kernel before and I got no error compiling it.
The last lines are:
kernel/chips/via686a.c -o kernel/chips/via686a.o
gcc -DMODVERSIONS -include /lib/modules/2.4.21-ben2/build/include/linux/modversions.h -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.21-ben2/build/include -nostdinc -I /usr/lib/gcc-lib/powerpc-linux/3.3/include -Wall -O2 -c kernel/chips/vt1211.c -o kernel/chips/vt1211.o
gcc -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -c lib/data.c -o lib/data.ao
In file included from lib/data.c:20:/usr/include/stdlib.h:445: error: parse error before "int32_t" /usr/include/stdlib.h:447: error: parse error before '*' token /usr/include/stdlib.h:451: error: parse error before '*' token /usr/include/stdlib.h:452: error: parse error before '}' token /usr/include/stdlib.h:455: error: parse error before "int32_t"
make: *** [lib/data.ao] Fehler 1
Let me know if you need anything more.
Thanks for your time and help.
Zeno
Quoted 5 lines
Quoted 3 lines
But I could be wrong. I would like you to try to compile some other program that uses
stdlib.h.What program would that be? I do know of any on the top of my mind.
Try the attached file. Compile with "gcc -Wall -W test-zeno.c -o test-zeno". Tell us if it fails or not.
Quoted 2 lines
Well, as I just said I recompiled my kernel before and I got no error compiling it.
That's different. The kernel, as i2c and the modules of lm_sensors, are kernel-space code. They use completely different headers. That's why i2c and the first half of lm_sensors could compile, while the second part of lm_sensors couldn't.
Quoted 13 lines
The last lines are:
gcc -I. -Ikernel/include -I/usr/local/include
(quoted diff) +0
-2-I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -c lib/data.c -o lib/data.aoIn file included from
lib/data.c:20:/usr/include/stdlib.h:445: error: parse error before "int32_t"/usr/include/stdlib.h:447: error: parse error before '*' token/usr/include/stdlib.h:451: error: parse error before '*' token/usr/include/stdlib.h:452: error: parse error before '}' token/usr/include/stdlib.h:455: error: parse error before "int32_t"
make: *** [lib/data.ao] Fehler 1
Quoted 1 line
Let me know if you need anything more.
Could you try the following (from the root of the lm_sensors package, where you would run "make"). Basically, the command that fails is:
gcc -I. -Ikernel/include -I/usr/local/include
-I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -c lib/data.c -o lib/data.ao
I would like you to try removing each -I parameter, in turn, or switch their order in any possible combination. If it is an include order problem, one of these should work. That's just a wild guess anyway, it may not work at all. We are not used to PPC systems...
Signature · 9 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
-------------- next part --------------
#include <stdlib.h>
int main(void)
{
return 0;
}Quoted 8 lines · On Wed, 30 Jul 2003 16:47:29 +0200 Jean Delvare <[email protected]> wrote:
Quoted 5 lines
Quoted 3 lines
But I could be wrong. I would like you to try to compile some other program that uses
stdlib.h.What program would that be? I do know of any on the top of my mind.
Try the attached file. Compile with "gcc -Wall -W
test-zeno.c-o test-zeno". Tell us if it fails or not.
Does not fail, compiles great.
Quoted 22 lines
Quoted 3 lines
Well, as I just said I recompiled my kernel before and I got no error compiling it.
That's different. The kernel, as i2c and the modules of
lm_sensors, are kernel-space code. They use completely different headers. That's why i2c and the first half oflm_sensorscould compile, while the second part oflm_sensorscouldn't.Quoted 13 lines
The last lines are:
gcc -I. -Ikernel/include -I/usr/local/include
(quoted diff) +0
-2-I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -c lib/data.c -o lib/data.aoIn file included from
lib/data.c:20:/usr/include/stdlib.h:445: error: parse error before "int32_t"/usr/include/stdlib.h:447: error: parse error before '*' token/usr/include/stdlib.h:451: error: parse error before '*' token/usr/include/stdlib.h:452: error: parse error before '}' token/usr/include/stdlib.h:455: error: parse error before "int32_t"
make: *** [lib/data.ao] Fehler 1
Quoted 11 lines
Quoted 1 line
Let me know if you need anything more.
Could you try the following (from the root of the
lm_sensorspackage, where you would run "make"). Basically, the command that fails is:
gcc -I. -Ikernel/include -I/usr/local/include
-I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -clib/data.c-olib/data.ao
I would like you to try removing each -I parameter, in turn, or switch their order in any possible combination. If it is an include order problem, one of these should work. That's just a wild guess anyway, it may not work at all. We are not used to PPC systems...
Sorry, please tell me how to remove the -I parameter.
Thanks for your time and help.
Zeno
Quoted 12 lines
Quoted 11 lines
Could you try the following (from the root of the
lm_sensorspackage, where you would run "make"). Basically, the command that fails is:
gcc -I. -Ikernel/include -I/usr/local/include
-I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -clib/data.c-olib/data.ao
I would like you to try removing each -I parameter, in turn, or switch their order in any possible combination. If it is an include order problem, one of these should work. That's just a wild guess anyway, it may not work at all. We are not used to PPC systems...
Quoted 1 line
Sorry, please tell me how to remove the -I parameter.
Well, just run the command by yourself (from the root of the lm_sensors package):
gcc -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.21-ben2/build/include -Wall -O2 -c lib/data.c -o lib/data.ao
This is expected to fail. Then try:
gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c lib/data.c -o lib/data.ao
See, I removed one -I parameter. If it's not OK, you can try removing another one instead, or two of them. If it's still not OK, you can try switching the order like that:
gcc -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.21-ben2/build/include -I. -Wall -O2 -c lib/data.c -o lib/data.ao
Or any other order. It's kind of repetitive work, I know, but if you can find one or more combinations that work, we'll have something to start from.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 2 lines · On Wed, 30 Jul 2003 17:45:31 +0200 Jean Delvare <[email protected]> wrote:
gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c
lib/data.c-olib/data.ao
this one worked fine.
What is next?
Thanks for feedback.
Zeno
Quoted 7 lines
Quoted 3 lines
gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c
lib/data.c-olib/data.aothis one worked fine.
What is next?
Attached is a Makefile I'd like you to try. Simply replace the original lm_sensors' Makefile with this one, then run "make clean && make". It works for me (which means it doesn't break the x86 compilation) and I expect it so solve your problem, at least partly.
Signature · 366 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/ -------------- next part -------------- # Makefile - Makefile for a Linux module for reading sensor data. # Copyright (c) 1998, 1999 Frodo Looijaard <[email protected]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Everything you may want to change is in the top of this file. Usually, you # can just use the defaults, fortunately. # You need a full complement of GNU utilities to run this Makefile succesfully; # most notably, you need bash, GNU make, flex (>= 2.5.1) and bison. # If your /bin/sh is not bash, change the below definition so that make can # find bash. Or you can hope your sh-like shell understands all scripts. # I think so, but I have not tested it. #SHELL := /usr/bin/bash # The currently running kernel version. This is used right below to # determine where the kernel sources can be found. KERNELVERSION := $(shell uname -r) # The location of linux itself. This is used to find the kernel headers # and other things. #LINUX := /usr/src/linux LINUX := $(shell if [ -L /lib/modules/$(KERNELVERSION)/build ] ; \ then echo "/lib/modules/$(KERNELVERSION)/build" ; \ else echo "/usr/src/linux" ; fi) LINUX_HEADERS := $(LINUX)/include # Determine whether we need to compile the kernel modules, or only the # user-space utilities. By default, the kernel modules are compiled. # Leave this set to 1. If you want to compile and install only # the library and the userspace programs, # use 'make user' and 'make user_install' #COMPILE_KERNEL := 0 COMPILE_KERNEL := 1 # If you have installed the i2c header at some other place (like # /usr/local/include/linux), set that directory here. Please check this out # if you get strange compilation errors; the default Linux i2c headers # may be used mistakenly. Note: This should point to the directory # *above* the linux/ subdirectory, so to /usr/local/include in the # above example. I2C_HEADERS := /usr/local/include #I2C_HEADERS := $(LINUX_HEADERS) # Uncomment the third line on SMP systems if the magic invocation fails. It # is a bit complicated because SMP configuration changed around kernel 2.1.130 SMP := $(shell if grep -q '^SMP[[:space:]]*=' $(LINUX)/Makefile || \ grep -q '^[[:space:]]*\#define[[:space:]]*CONFIG_SMP[[:space:]]*1' $(LINUX_HEADERS)/linux/autoconf.h ; \ then echo 1; else echo 0; fi) #SMP := 0 #SMP := 1 # Uncomment the second or third line if the magic invocation fails. # We need to know whether CONFIG_MODVERSIONS is defined. MODVER := $(shell if cat $(LINUX_HEADERS)/linux/config.h $(LINUX_HEADERS)/linux/autoconf.h 2>/dev/null | grep -q '^[[:space:]]*\#define[[:space:]]*CONFIG_MODVERSIONS[[:space:]]*1'; then echo 1; else echo 0; fi) #MODVER := 0 #MODVER := 1 # Uncomment the second line if you are a developer. This will enable many # additional warnings at compile-time WARN := 0 #WARN := 1 # Uncomment the second line if you want to get (loads of) debug information # at run-time. # Not recommended, unless you are actually debugging the code DEBUG := 0 #DEBUG := 1 # If you want to install at some other place then at from which you will run # everything, set DESTDIR to the extra prefix. DESTDIR : # This is the prefix that will be used for almost all directories below. PREFIX := /usr/local # This is the main modules directory into which the modules will be installed. # The magic invocation will return something like this: # /lib/modules/2.2.15-ac9 #MODDIR := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'`/misc #MODPREF := /lib/modules/$(KERNELVERSION) #MODPREF := /lib/modules/`grep UTS_RELEASE $(LINUX_HEADERS)/linux/version.h|cut -f 2 -d'"'` MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | grep uts_release |cut -f 2 -d'"') # This is the directory where sensors.conf will be installed, if no other # configuration file is found ETCDIR := /etc # You should not need to change this. It is the directory into which the # library files (both static and shared) will be installed. LIBDIR := $(PREFIX)/lib # You should not need to change this. It is the directory into which the # executable program files will be installed. BINDIR for programs that are # also useful for normal users, SBINDIR for programs that can only be run # by the superuser. # Note that not all programs in this package are really installed; # some are just examples. You can always install them by hand, of # course. BINDIR := $(PREFIX)/bin SBINDIR := $(PREFIX)/sbin # You should not need to change this. It is the basic directory into which # include files will be installed. The actual directory will be # $(INCLUDEDIR)/linux for system include files, and $(INCLUDEDIR)/sensors # for library include files. If PREFIX equals the default /usr/local/bin, # you will be able to use '#include <linux/sensors.h>' regardless of the # current kernel selected. INCLUDEDIR := $(PREFIX)/include SYSINCLUDEDIR := $(INCLUDEDIR)/linux LIBINCLUDEDIR := $(INCLUDEDIR)/sensors # You should not need to change this. It is the base directory under which the # manual pages will be installed. MANDIR := $(PREFIX)/man # You should not need to change this. It defines the manual owner and group # as which manual pages are installed. MANOWN := root MANGRP := root MACHINE := $(shell uname -m) # Extra non-default programs to build; e.g., sensord # PROG_EXTRA := sensord # Set these to add preprocessor or compiler flags, or use # environment variables # CFLAGS :# CPPFLAGS : ################################################## # Below this, nothing should need to be changed. # ################################################## # Note that this is a monolithic Makefile; it calls no sub-Makefiles, # but instead, it compiles everything right from here. Yes, there are # some distinct advantages to this; see the following paper for more info: # http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html # Note that is still uses Makefile fragments in sub-directories; these # are called 'Module.mk'. # Within each Module.mk, rules and dependencies can be added to targets # all, install and clean. Use double colons instead of single ones # to do this. # The subdirectories we need to build things in SRCDIRS := mkpatch ifeq ($(COMPILE_KERNEL),1) SRCDIRS += kernel kernel/busses kernel/chips kernel/include endif SRCDIRS += lib prog/sensors prog/dump prog/detect ${PROG_EXTRA:%=prog/%} etc # Some often-used commands with default options MKDIR := mkdir -p RMDIR := rmdir RM := rm -f CC := gcc BISON := bison FLEX := flex AR := ar INSTALL := install LN := ln -sfn GREP := grep AWK := awk SED := sed # Determine the default compiler flags # Set CFLAGS or CPPFLAGS above to add your own flags to all. # ALLCPPFLAGS/ALLCFLAGS are common flags, plus any user-specified overrides from the environment or make command line. # MODCPPFLAGS/MODCFLAGS is to create in-kernel object files (modules). # PROGCPPFLAGS/PROGCFLAGS is to create non-kernel object files (which are linked into executables). # ARCPPFLAGS/ARCFLAGS are used to create archive object files (static libraries). # LIBCPPFLAGS/LIBCFLAGS are for shared library objects. ALL_CPPFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) ALL_CFLAGS := -Wall -O2 ifeq ($(DEBUG),1) ALL_CPPFLAGS += -DDEBUG endif ifeq ($(WARN),1) ALL_CFLAGS += -W -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wnested-externs -Winline endif ALL_CPPFLAGS += $(CPPFLAGS) ALL_CFLAGS += $(CFLAGS) MODCPPFLAGS :MODCFLAGS : ifeq ($(MACHINE),alpha) MODCFLAGS += -ffixed-8 endif ifeq ($(MACHINE),x86_64) MODCFLAGS += -fno-strict-aliasing -fno-common -fomit-frame-pointer -mno-red-zone\ -mcmodel=kernel -fno-reorder-blocks -finline-limit 00 -fno-strength-reduce endif ifeq ($(SMP),1) MODCPPFLAGS += -D__SMP__ endif ifeq ($(MODVER),1) MODCPPFLAGS += -DMODVERSIONS -include $(LINUX_HEADERS)/linux/modversions.h endif # This magic is from the kernel Makefile. # Extra cflags for kbuild 2.4. The default is to forbid includes by kernel code # from user space headers. kbuild_2_4_nostdinc := -nostdinc $(shell LC_ALL=C $(CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') MODCPPFLAGS += -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer $(ALL_CPPFLAGS) -I$(LINUX_HEADERS) $(kbuild_2_4_nostdinc) MODCFLAGS += $(ALL_CFLAGS) PROGCPPFLAGS := $(ALL_CPPFLAGS) PROGCFLAGS := $(ALL_CFLAGS) ARCPPFLAGS := $(ALL_CPPFLAGS) ARCFLAGS := $(ALL_CFLAGS) LIBCPPFLAGS := $(ALL_CPPFLAGS) LIBCFLAGS := -fpic $(ALL_CFLAGS) .PHONY: all clean install version package dep # Make all the default rule all:: # Include all makefiles for sub-modules INCLUDEFILES := include $(patsubst %,%/Module.mk,$(SRCDIRS)) ifneq ($(MAKECMDGOALS),clean) include $(INCLUDEFILES) endif # Making the dependency files - done automatically! dep : user :: user_install:: all :: user install :: all user_install @echo "*** The depmod command below may generate errors. We are aware of the" @echo "*** problem and are working on a solution. You should ignore them for now." ifeq ($(DESTDIR),) -/sbin/depmod -a else -/sbin/depmod -a -b $(DESTDIR) endif @echo "*** Installation successful!" @echo "*** Important notes:" @echo "*** 1* The libsensors configuration file ($(ETCDIR)/sensors.conf) is never" @echo "*** overwritten by our installation process, so that you won't lose" @echo "*** your personal settings in that file. You still can get our latest" @echo "*** default config file in etc/sensors.conf.eg and manually copy it to" @echo "*** $(ETCDIR)/sensors.conf if you want. You will then want to edit it" @echo "*** to fit your needs again." @echo "*** 2* The dmidecode tool ($(SBINDIR)/dmidecode) is not necessarily" @echo "*** overwritten either, because we don't distribute the latest version." @echo "*** If you know you have an old one (1.7 or earlier), you should copy" @echo "*** our version (prog/detect/dmidecode) to $(SBINDIR)/dmidecode. Our" @echo "*** installation process relies on a simple date comparison to decide" @echo "*** wether or not it should overwrite the file, but the trick may" @echo "*** fail if for any reason you installed an old verion of dmidecode" @echo "*** at a time a newer version was available." clean:: $(RM) lm_sensors-* # This is tricky, but it works like a charm. It needs lots of utilities # though: cut, find, gzip, ln, tail and tar. package: version clean lmversion=`tail -1 version.h|cut -f 2 -d \"`; \ lmpackage=lm_sensors-$$lmversion; \ ln -s . $$lmpackage; \ find $$lmpackage/ -type f | grep -v ^$$lmpackage/$$lmpackage$$ | \ grep -v ^$$lmpackage/$$lmpackage.tar$$ | \ grep -v ^$$lmpackage/$$ | \ grep -v /CVS | \ grep -v /\\.# | \ tar rvf $$lmpackage.tar -T -; \ gzip -9 $$lmpackage.tar ;\ $(RM) $$lmpackage.tar $$lmpackage cat doc/developers/checklist version: $(RM) version.h echo '#define LM_DATE "'`date +'%Y%m%d'`\" > version.h echo -n 'Version: '; \ echo '#define LM_VERSION "'`read VER; echo $$VER`\" >> version.h help: @echo 'Make targets are:' @echo ' all (default): build modules and userspace programs' @echo ' install: install modules and userspace programs' @echo ' user: build userspace programs' @echo ' user_install: install userspace programs' @echo ' clean: cleanup' @echo ' package: create a distribution package' @echo 'Note: make dep is automatic' # Here, we define all implicit rules we want to use. .SUFFIXES: # We need to create dependency files. Tricky. We sed rule puts dir/file.d and # dir/file.c in front of the dependency file rule. # .o files are used for modules %.o: %.c $(CC) $(MODCPPFLAGS) $(MODCFLAGS) -c $< -o $@ %.d: %.c $(CC) -M -MG $(MODCPPFLAGS) $(MODCFLAGS) $< | \ $(SED) -e 's@^\(.*\)\.o:@$*.d $*.o: Makefile '`dirname $*.d`/Module.mk' @' > $@ # .ro files are used for programs (as opposed to modules) %.ro: %.c $(CC) $(PROGCPPFLAGS) $(PROGCFLAGS) -c $< -o $@ %.rd: %.c $(CC) -M -MG $(PROGCPPFLAGS) $(PROGCFLAGS) $< | \ $(SED) -e 's@^\(.*\)\.o:@$*.rd $*.ro: Makefile '`dirname $*.rd`/Module.mk' @' > $@ %: %.ro $(CC) $(EXLDFLAGS) -o $@ $^ # .ao files are used for static archives %.ao: %.c $(CC) $(ARCPPFLAGS) $(ARCFLAGS) -c $< -o $@ %.ad: %.c $(CC) -M -MG $(ARCPPFLAGS) $(ARCFLAGS) $< | \ $(SED) -e 's@^\(.*\)\.o:@$*.ad $*.ao: Makefile '`dirname $*.ad`/Module.mk' @' > $@ # .lo files are used for shared libraries %.lo: %.c $(CC) $(LIBCPPFLAGS) $(LIBCFLAGS) -c $< -o $@ %.ld: %.c $(CC) -M -MG $(LIBCPPFLAGS) $(LIBCFLAGS) $< | \ $(SED) -e 's@^\(.*\)\.o:@$*.ld $*.lo: Makefile '`dirname $*.ld`/Module.mk' @' > $@ # Flex and Bison %c: %y $(BISON) -p sensors_yy -d $< -o $@ %.c: %.l $(FLEX) -Psensors_yy -t $< > $@
Quoted 4 lines · On Wed, 30 Jul 2003 18:16:44 +0200 Jean Delvare <[email protected]> wrote:
Quoted 4 lines
Quoted 3 lines
gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c
lib/data.c-olib/data.ao
Quoted 8 lines
Quoted 3 lines
this one worked fine.
What is next?
Attached is a
MakefileI'd like you to try. Simply replace the originallm_sensors'Makefilewith this one, then run "make clean && make". It works for me (which means it doesn't break the x86 compilation) and I expect it so solve your problem, at least partly.
ok. done that. now I get:
k' @' > kernel/busses/i2c-ali1535.d
gcc -M -MG -DMODVERSIONS -include /lib/modules/2.4.21-ben2/build/include/linux/modversions.h -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.21-ben2/build/include -nostdinc -I /usr/lib/gcc-lib/powerpc-linux/3.3/include -Wall -O2 kernel/busses/i2c-nforce2.c | \
sed -e 's@^\(.*\)\.o:@kernel/busses/i2c-nforce2.d kernel/busses/i2c-nforce2.o: Makefile '`dirname kernel/busses/i2c-nforce2.d`/Module.mk' @' > kernel/busses/i2c-nforce2.dmake: *** Keine Regel vorhanden, um das Target ?sys/io.h?,
ben?tigt von ?prog/dump/isadump.rd?, zu erstellen. Schluss.
Thanks for your feedback.
Zeno
Quoted 9 lines
ok. done that. now I get:
k' @' >
kernel/busses/i2c-ali1535.d
gcc -M -MG -DMODVERSIONS -include/lib/modules/2.4.21-ben2/build/include/linux/modversions.h(quoted diff) +0
-3-D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -I. -Ikernel/include -I/usr/local/include -I/lib/modules/2.4.21-ben2/build/include -nostdinc -I
/usr/lib/gcc-lib/powerpc-linux/3.3/include-Wall -O2
Quoted 7 lines
kernel/busses/i2c-nforce2.c | \ sed -e 's@^\(.*\)\.o:@kernel/busses/i2c-nforce2.d kernel/busses/i2c-nforce2.o: Makefile '`dirname kernel/busses/i2c-nforce2.d`/Module.mk' @' > kernel/busses/i2c-nforce2.dmake: *** Keine Regel vorhanden, um das Target ?sys/io.h?,
ben?tigt von ?prog/dump/isadump.rd?, zu erstellen. Schluss.
Do you have any sys/io.h file on your system (use find or locate)? Some systems have asm/io.h instead. There is a macro that is supposed to decide which one to chose, but maybe it isn't working for PPC systems.
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 3 lines · On Wed, 30 Jul 2003 18:56:33 +0200 Jean Delvare <[email protected]> wrote:
Do you have any
sys/io.hfile on your system (use find or locate)? Some systems haveasm/io.hinstead. There is a macro that is supposed to decide which one to chose, but maybe it isn't working for PPC systems.
zeno@zrr:/var/log$ sudo find / -name io.h /usr/include/asm/io.h /usr/src/benh_kernel/fs/befs/io.h /usr/src/benh_kernel/include/asm-alpha/io.h /usr/src/benh_kernel/include/asm-arm/arch-anakin/io.h /usr/src/benh_kernel/include/asm-arm/arch-arc/io.h /usr/src/benh_kernel/include/asm-arm/arch-cl7500/io.h /usr/src/benh_kernel/include/asm-arm/arch-clps711x/io.h /usr/src/benh_kernel/include/asm-arm/arch-ebsa110/io.h /usr/src/benh_kernel/include/asm-arm/arch-ebsa285/io.h /usr/src/benh_kernel/include/asm-arm/arch-epxa10db/io.h /usr/src/benh_kernel/include/asm-arm/arch-integrator/io.h /usr/src/benh_kernel/include/asm-arm/arch-l7200/io.h /usr/src/benh_kernel/include/asm-arm/arch-mx1ads/io.h /usr/src/benh_kernel/include/asm-arm/arch-nexuspci/io.h /usr/src/benh_kernel/include/asm-arm/arch-rpc/io.h /usr/src/benh_kernel/include/asm-arm/arch-sa1100/io.h /usr/src/benh_kernel/include/asm-arm/arch-shark/io.h /usr/src/benh_kernel/include/asm-arm/arch-tbox/io.h /usr/src/benh_kernel/include/asm-arm/io.h /usr/src/benh_kernel/include/asm-cris/io.h /usr/src/benh_kernel/include/asm-i386/io.h /usr/src/benh_kernel/include/asm-ia64/sn/io.h /usr/src/benh_kernel/include/asm-ia64/io.h /usr/src/benh_kernel/include/asm-m68k/io.h /usr/src/benh_kernel/include/asm-mips/io.h /usr/src/benh_kernel/include/asm-mips64/ip32/io.h /usr/src/benh_kernel/include/asm-mips64/mips-boards/io.h /usr/src/benh_kernel/include/asm-mips64/sgi/io.h /usr/src/benh_kernel/include/asm-mips64/sibyte/io.h /usr/src/benh_kernel/include/asm-mips64/sn/io.h /usr/src/benh_kernel/include/asm-mips64/io.h /usr/src/benh_kernel/include/asm-parisc/io.h /usr/src/benh_kernel/include/asm-ppc/io.h /usr/src/benh_kernel/include/asm-ppc64/io.h /usr/src/benh_kernel/include/asm-s390/io.h /usr/src/benh_kernel/include/asm-s390x/io.h /usr/src/benh_kernel/include/asm-sh/io.h /usr/src/benh_kernel/include/asm-sparc/io.h /usr/src/benh_kernel/include/asm-sparc64/io.h /usr/src/benh_kernel/include/asm-x86_64/io.h
Thanks for further feedback.
Zeno
Quoted 11 lines
Quoted 4 lines · On Wed, 30 Jul 2003 18:56:33 +0200 Jean Delvare <[email protected]> wrote:
Do you have any
sys/io.hfile on your system (use find or locate)? Some systems haveasm/io.hinstead. There is a macro that is supposed to decide which one to chose, but maybe it isn't working for PPC systems.zeno@zrr:/var/log$ sudo find / -name io.h /usr/include/asm/io.h
OK, so thats the problem. Your io.h is in asm, and we look for it in sys.
What's your glibc version? (ls -l /lib/libc-*.so will tell you).
Anyway, this problem is completely different from the other one (well, I think so) so we'll leave it apart for now. Please edit proc/dump/isadump.c. At the beginning you'll see:
/* To keep glibc2 happy */
#if defined(__GLIBC__) && __GLIBC__ = 2 && __GLIBC_MINOR__ >= 0 #include <sys/io.h>
#else
#include <asm/io.h>
#endif
Simply replace the whole block with:
#include <asm/io.h>
Save, and try to compile again. I hope it will be fine. I'll think of a real fix later. This is the only program using this file. With a bit of luck, it was the last compilation problem :)
Signature · 2 lines
Jean Delvare http://www.ensicaen.ismra.fr/~delvare/
Quoted 7 lines · On Thu, 31 Jul 2003 10:23:03 +0200 Jean Delvare <[email protected]> wrote:
Quoted 3 lines
On Wed, 30 Jul 2003 18:56:33 +0200
Jean Delvare <[email protected]> wrote:OK, so thats the problem. Your
io.his in asm, and we look for it in sys.What's your glibc version? (ls -l
/lib/libc-*.sowill tell you).
-rwxr-xr-x 1 root root 1273304 2003-04-20 19:36 /lib/libc-2.3.1.so
Quoted 12 lines
Anyway, this problem is completely different from the other one (well, I think so) so we'll leave it apart for now. Please edit
proc/dump/isadump.c. At the beginning you'll see:/* To keep glibc2 happy */
#ifdefined(__GLIBC__)&&__GLIBC__= 2 &&__GLIBC_MINOR__>= 0 #include <sys/io.h>
#else
#include <asm/io.h>
#endif
Quoted 7 lines
Simply replace the whole block with:
#include <
asm/io.h>Save, and try to compile again. I hope it will be fine. I'll think of a real fix later. This is the only program using this file. With a bit of luck, it was the last compilation problem :)
well it is compiling now...
Will get back to you as soon as I know about success or failure.
Thanks in the meantime.
Zeno
Signature · 8 lines
Mit freundlichen Gruessen / Best regards Zeno Davatz Strategie und Akquisition +41 1 350 85 86 www.ywesee.com > intellectual capital connected > www.generika.cc
Quoted 13 lines · On Thu, 31 Jul 2003 10:23:03 +0200 Jean Delvare <[email protected]> wrote:
Quoted 3 lines
On Wed, 30 Jul 2003 18:56:33 +0200
Jean Delvare <[email protected]> wrote:think so) so we'll leave it apart for now. Please edit
proc/dump/isadump.c. At the beginning you'll see:/* To keep glibc2 happy */
#ifdefined(__GLIBC__)&&__GLIBC__= 2 &&__GLIBC_MINOR__>= 0 #include <sys/io.h>
#else
#include <asm/io.h>
#endif
Quoted 4 lines
Simply replace the whole block with:
#include <
asm/io.h>
Now I get:
gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c prog/sensors/main.c -o prog/sensors/main.ro gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c prog/sensors/chips.c -o prog/sensors/chips.ro
gcc -o prog/sensors/sensors prog/sensors/main.ro prog/sensors/chips.ro -Llib -lsensors
gcc -I. -Ikernel/include -I/usr/local/include -Wall -O2 -c prog/dump/isadump.c -o prog/dump/isadump.roprog/dump/isadump.c: In function `main':prog/dump/isadump.c:174: Warnung: implicit declaration of function outb' prog/dump/isadump.c:183: Warnung: implicit declaration of function inb' gcc -o prog/dump/isadump prog/dump/isadump.ro prog/dump/isadump.ro(.text+0x284): In function `main':
: undefined reference to `outb'
prog/dump/isadump.ro(.text+0x290): In function `main':
: undefined reference to `inb'
prog/dump/isadump.ro(.text+0x308): In function `main':
: undefined reference to `outb'
prog/dump/isadump.ro(.text+0x318): In function `main':
: undefined reference to `outb'
prog/dump/isadump.ro(.text+0x32c): In function `main':
: undefined reference to `outb'
prog/dump/isadump.ro(.text+0x33c): In function `main':
: undefined reference to `outb'
collect2: ld returned 1 exit status
make: *** [prog/dump/isadump] Fehler 1
Thanks for Feedback.
Zeno