AW: Problem linking with cygipc

Ralf Habacker Ralf.Habacker@freenet.de
Sat Sep 1 14:08:00 GMT 2001


> Hi,
>
> I am trying to port/build the fakeroot package, and I'm
> having a problem linking.  I have downloaded
> and installed the cygipc-1.09-2.tar.gz, and have
> run ipc-daemon --install-as-service.  It starts fine, and
> the ipctest tests seem to work ok.
>
> However, when I'm trying to link the faked program from
> fakeroot, I get the output below:
>
> Does anyone have any ideas?   (Is this a C++ signature problem,
> maybe??)
>

Yes it it. I have the same problem with kde.
A short fix is to encapsulate the ipc header files ipc.h and shm.h with

#ifdef __cplusplus
extern "C" {
#endif
#include <sys/ipc.h>
#include <sys/shm.h>
#ifdef __cplusplus
}
#endif

Currently I'm preparing a patch for the cygipc maintainer to integrating this
into future releases.

Ralf Habacker
KDE on Cygwin http://kde-cygwin.sourceforge.net

> Thanks
>
> -------------  OUTPUT HERE -----------------------------------------------
>
> CONFIG_FILES= CONFIG_HEADERS= /bin/sh ./config.status
> /bin/sh ./libtool --mode=link c++  -g -Wall -W -pedantic   -o faked
> -L/usr/local
> /lib -lcygipc faked.o communicate.o
> c++ -g -Wall -W -pedantic -o faked -L/usr/local/lib -lcygipc faked.o
> communicate
> .o
> faked.o: In function `get_msg(void)':
> /usr/src/fakeroot-0.4.4/faked.cc:361: undefined reference to
> `msgrcv(int, msgbuf
>  *, unsigned int, long, int)'
> faked.o: In function `cleanup(int)':
> /usr/src/fakeroot-0.4.4/faked.cc:386: undefined reference to
> `msgctl(int, int, m
> sqid_ds *)'
> /usr/src/fakeroot-0.4.4/faked.cc:387: undefined reference to
> `msgctl(int, int, m
> sqid_ds *)'
> /usr/src/fakeroot-0.4.4/faked.cc:388: undefined reference to
> `semctl(int, int, i
> nt, semun)'
> faked.o: In function `main':
> /usr/src/fakeroot-0.4.4/faked.cc:450: undefined reference to
> `msgget(long, int)'
>
> /usr/src/fakeroot-0.4.4/faked.cc:451: undefined reference to
> `msgget(long, int)'
>
> /usr/src/fakeroot-0.4.4/faked.cc:452: undefined reference to
> `semget(long, int,
> int)'
> /usr/src/fakeroot-0.4.4/faked.cc:454: undefined reference to
> `semctl(int, int, i
> nt, semun)'
> communicate.o: In function `semaphore_up':
> /usr/src/fakeroot-0.4.4/communicate.c:143: undefined reference to `semget'
> /usr/src/fakeroot-0.4.4/communicate.c:148: undefined reference to `semop'
> communicate.o: In function `semaphore_down':
> /usr/src/fakeroot-0.4.4/communicate.c:153: undefined reference to `semget'
> /usr/src/fakeroot-0.4.4/communicate.c:157: undefined reference to `semop'
> communicate.o: In function `send_fakem':
> /usr/src/fakeroot-0.4.4/communicate.c:165: undefined reference to `msgsnd'
> communicate.o: In function `send_get_fakem':
> /usr/src/fakeroot-0.4.4/communicate.c:213: undefined reference to `msgrcv'
> communicate.o: In function `init_get_msg':
> /usr/src/fakeroot-0.4.4/communicate.c:274: undefined reference to `msgget'
> /usr/src/fakeroot-0.4.4/communicate.c:275: undefined reference to `msgget'
> collect2: ld returned 1 exit status
>
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list