After running configure and make, it exits out with a warning on the XWindows.C file: Here is a transcript:
gcc -DPACKAGE=\"lcd4linux\" -DVERSION=\"0.95\" -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_UNAME=1 -I. -I. -Wall -g -O2 -c XWindow.c
XWindow.c: In function `semcleanup':
XWindow.c:106: storage size of `arg' isn't known
XWindow.c:106: warning: unused variable `arg'
XWindow.c: In function `init_thread':
XWindow.c:152: storage size of `semun' isn't known
XWindow.c:152: warning: unused variable `semun'
make: *** [XWindow.o] Error 1
I need some more information about your environment (Linux release, libc version, X11 version) and especially your email-address!
Submitted by \'none\' won\'t help much...
I am using Red Hat linux 6.1. Gblic 2.1.2. Libc5 X windows version 3.3.5. On a side note, I tried compiling v.93 and that didn\'t work either. My email should be aim4min@sourceforge.net.
try the following:
bash-2.02# grep semun /usr/include/sys/*
this sould result in:
/usr/include/sys/sem.h: union semun __arg));
/usr/include/sys/sem_buf.h:union semun,
semun being:/* Union used for argument for `semctl\'. */
union semun
{
int val; /* value for SETVAL
struct semid_ds *buf; /* buffer for IPC_ST
unsigned short int *array; /* array for GETALL
struct seminfo *__buf; /* buffer for IPC_IN
};
you dont have that file?
you have a problem with your libc.
/herp
I don\'t have that file. I have sem.h, but sem_buf.h is missing. Does this mean i have to upgrade my version of libc? Thanks
I don\'t know much about RedHat. Which kernel does 6.1 use? 2.0 or 2.2?
Do you have the kernel-sources installed? For me(I don\'t have a glibc-system, I\'m running libc5) /usr/include/sys/sem.h includes /usr/include/linux/sem.h, where \'union semun\' is defined. There\'s no sem_buf.h with libc5.
Did you ever have compile problems before? You said you couldn\'t compile 0.93, but 0.93 didn\'t have a X11-driver!
Try to check your /usr/include/sys/sem.h which other files it includes, and check these files. Maybe you can find a hint...
bye, Michael
Redhat 6.1 uses a 2.2 kernel. I have /usr/include/sys/sem.h, but union semun isn\'t defined. The problem is the same with v0.93. The same error... it\'s definately looking for union semun. Red Hat is a glibc distro, with libc compatability. I haven\'t had trouble compiling anything else. Thanks
This is my sem.h:
/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _SYS_SEM_H
#define _SYS_SEM_H 1
#include <features.h>
#include <sys/types.h>
/* Get common definition of System V style IPC. */
#include <sys/ipc.h>
/* Get system dependent definition of `struct semid_ds\' and more. */
#include <bits/sem.h>
/* The following System V style IPC functions implement a semaphore
handling. The definition is found in XPG2. */
/* Structure used for argument to `semop\' to describe operations. */
struct sembuf
{
short int sem_num; /* semaphore number */
short int sem_op; /* semaphore operation */
short int sem_flg; /* operation flag */
};
__BEGIN_DECLS
/* Semaphore control operation. */
extern int semctl __P ((int __semid, int __semnum, int __cmd, ...));
/* Get semaphore. */
extern int semget __P ((key_t __key, int __nsems, int __semflg));
/* Operate on semaphore. */
extern int semop __P ((int __semid, struct sembuf *__sops,
unsigned int __nsops));
__END_DECLS
#endif /* sys/sem.h */
Sorry for so many comments, but i found something interesting doing a google search for union semun. Here is the message: http://sourceware.cygnus.com/ml/libc-alpha/1999-07/msg00092.html
It says that union semun was defined in glibc2.0, but in glibc2.1 it has to be defined by the user program. Can this be resolved by implemented union semun in lcd4linux?
Well, thanks _a lot_ for your comments.
I think I fixed the bug. i just downloaded glibc-2.1.3 and had a look at sem.h. Now we define the union semun ourselves for glibc-2.1 and later.
Please check out lcd4linux-0.96a and test it. If it compiles correctly, this patch will make it into 0.97
bye, Michael
I just tried out version v0.96a. It compiles cleanly now. Thanks for the fix! This a really cool program. Have you heard of LCDproc? I\'m trying to rewrite it in C++. Thanks again, later...