#1 Cannot compile v0.95

X11 (2)

After running configure and make, it exits out with a warning on the XWindows.C file: Here is a transcript:

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


  • Michael Reinelt

    Michael Reinelt - 2000-04-03
    • assigned_to: nobody --> reinelt
    • status: Error - status not found --> open
  • Michael Reinelt

    Michael Reinelt - 2000-04-03

    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...

  • Michael Reinelt

    Michael Reinelt - 2000-04-03
    • labels: 100100 --> X11
    • status: open --> open-later
  • Mindaugas Idzelis

    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.

  • Nobody/Anonymous

    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.


  • Mindaugas Idzelis

    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

  • Michael Reinelt

    Michael Reinelt - 2000-04-04
    • status: open-later --> open
  • Michael Reinelt

    Michael Reinelt - 2000-04-04

    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

  • Nobody/Anonymous

    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

  • Nobody/Anonymous

    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
    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 */


    /* 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));


    #endif /* sys/sem.h */

  • Nobody/Anonymous

    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?

  • Michael Reinelt

    Michael Reinelt - 2000-04-05

    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

  • Nobody/Anonymous

    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...

  • Michael Reinelt

    Michael Reinelt - 2000-04-06
    • status: open --> closed
  • Michael Reinelt

    Michael Reinelt - 2001-06-21
    • status: closed --> wont-fix
  • Michael Reinelt

    Michael Reinelt - 2001-07-01
    • status: wont-fix --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks