LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 12-28-2008, 12:06 PM   #1
johnnyhal
LQ Newbie
 
Registered: Dec 2008
Posts: 1

Rep: Reputation: 0
sys/types.h & linux/types.h conflict while compiling


Hi,

I'm having trouble solving this problem. I'm compiling xfce4-battery-plugin and I keep getting an error about conflicting types in sys/types.h and linux/types.h while making battmon.c. The output is:

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -I/usr/include/xfce4/ -I/usr/include/xfce4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -I/usr/include/atk-1.0 -g -O2 -MT xfce4_battery_plugin-battmon.o -MD -MP -MF ".deps/xfce4_battery_plugin-battmon.Tpo" -c -o xfce4_battery_plugin-battmon.o `test -f 'battmon.c' || echo './'`battmon.c; \
then mv -f ".deps/xfce4_battery_plugin-battmon.Tpo" ".deps/xfce4_battery_plugin-battmon.Po"; else rm -f ".deps/xfce4_battery_plugin-battmon.Tpo"; exit 1; fi
In file included from ./apm.h:24,
from battmon.c:44:
/usr/include/sys/types.h:62: error: conflicting types for 'dev_t'
/usr/include/linux/types.h:13: error: previous declaration of 'dev_t' was here
/usr/include/sys/types.h:67: error: conflicting types for 'gid_t'
/usr/include/linux/types.h:27: error: previous declaration of 'gid_t' was here
/usr/include/sys/types.h:72: error: conflicting types for 'mode_t'
/usr/include/linux/types.h:15: error: previous declaration of 'mode_t' was here
/usr/include/sys/types.h:77: error: conflicting types for 'nlink_t'
/usr/include/linux/types.h:16: error: previous declaration of 'nlink_t' was here
/usr/include/sys/types.h:82: error: conflicting types for 'uid_t'
/usr/include/linux/types.h:26: error: previous declaration of 'uid_t' was here
In file included from /usr/include/sys/types.h:133,
from ./apm.h:24,
from battmon.c:44:
/usr/include/time.h:105: error: conflicting types for 'timer_t'
/usr/include/linux/types.h:22: error: previous declaration of 'timer_t' was here
In file included from /usr/include/sys/types.h:220,
from ./apm.h:24,
from battmon.c:44:
/usr/include/sys/select.h:78: error: conflicting types for 'fd_set'
/usr/include/linux/types.h:12: error: previous declaration of 'fd_set' was here
In file included from ./apm.h:24,
from battmon.c:44:
/usr/include/sys/types.h:235: error: conflicting types for 'blkcnt_t'
/usr/include/linux/types.h:124: error: previous declaration of 'blkcnt_t' was here
make[2]: *** [xfce4_battery_plugin-battmon.o] Error 1
make[2]: Leaving directory `/root/Desktop/xfce4-battery-plugin-0.4.90.2/panel-plugin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Desktop/xfce4-battery-plugin-0.4.90.2'
make: *** [all] Error 2

Anyone know what's causing this?

Thanks,
Johnny
 
Old 12-28-2008, 06:39 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to Linux Questions.

A usable version is here
http://packages.debian.org/lenny/xfce4-battery-plugin
[xfce4-battery-plugin_0.5.0.orig.tar.gz]
[xfce4-battery-plugin_0.5.0-7.diff.gz] The patch is important !

1) place the patch outside xfce4-battery-plugin-0.5.0 and
'patch -p0 < xfce4-battery-plugin_0.5.0-7.diff'

2) go to the "patch directory" xfce4-battery-plugin-0.5.0/debian/patches/
and move all patches outside xfce4-battery-plugin-0.5.0

3) apply patches 02 05 06 07 08. Patch 07 must be edited :

line 1, 2, 345, 346 change xfce4-battery-plugin-0.5.0.orig
to xfce4-battery-plugin-0.5.0

4) move patch 03 inside the xfce4-battery-plugin-0.5.0/ and
apply it there.

Now you can configure and make.
If you have questions, always tell, which Linux is used.
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html

Good Luck !
....

Last edited by knudfl; 12-29-2008 at 09:39 AM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
conflicting redeclaration of sys/types.h and linux/types.h schmil Programming 6 12-11-2008 02:02 PM
[SOLVED] Minix & BIOS supporting only 47 types of HDDs 10110111 Other *NIX 2 09-22-2008 12:41 PM
What is the packet for unistd.h sys/types.h ? spank Linux - Newbie 3 03-03-2007 11:32 AM
c preprocessor commands & return types(?) kpachopoulos Programming 4 12-06-2005 09:18 AM
wat does <sys/types.h> mean? 9488 Programming 1 10-01-2005 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration