Troubleshooting
Problem
When rebuilding the C language OXF framework with IBM Rational Rhapsody, you might experience this build error, "conflicting types for 'select'" or when trying to build/simulate your C language project you might observe multiple linker errors reporting missing Rhapsody OXF framework symbols.
Symptom
When rebuilding the C language OXF framework with IBM Rational Rhapsody, you might experience this build error:
In file included from /usr/include/w32api/windows.h:92:0,
from ../oxf/RiCOSNT.h:25,
from ../osconfig/cygwin/RiCOS.h:22,
from ../oxf/RiCOSWrap.h:26,
from aombrk.c:29:
/usr/include/w32api/winsock.h:299:34: error: conflicting types for 'select'
WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
^
In file included from /usr/include/sys/types.h:68:0,
from /usr/include/stdio.h:61,
from aombrk.c:21:
/usr/include/sys/select.h:73:5: note: previous declaration of 'select' was here
int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
^
make[1]: *** [cygwinaom.mak:31: aombrk.o] Error 1
make[1]: Leaving directory '/cygdrive/c/Rhapsody8.1.4/Share/LangC/aom'
make: *** [cygwinbuild.mak:28: aomlibs] Error 2
Or when you try to build/simulate your C language project you may observe multiple linker errors reporting missing Rhapsody OXF framework symbols:
/cygdrive/c/Rhapsody8.1.3/Samples/CSamples/Dishwasher/DefaultComponent_Cygwin/Release/MainDefaultComponent_Cygwin.c:25: undefined reference to `RiCOXFInit'
/cygdrive/c/Rhapsody8.1.3/Samples/CSamples/Dishwasher/DefaultComponent_Cygwin/Release/MainDefaultComponent_Cygwin.c:25:(.text+0x73): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `RiCOXFInit'
/cygdrive/c/Rhapsody8.1.3/Samples/CSamples/Dishwasher/DefaultComponent_Cygwin/Release/MainDefaultComponent_Cygwin.c:30: undefined reference to `RiCOXFStart'
/cygdrive/c/Rhapsody8.1.3/Samples/CSamples/Dishwasher/DefaultComponent_Cygwin/Release/MainDefaultComponent_Cygwin.c:30:(.text+0x86): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `RiCOXFStart'
Cause
Cygwin GNU GCC compiler has added an additional select function to its conditional compiler directives
Resolving The Problem
This is fixed in Rhapsody 8.1.5 as an internal maintenance update. Therefore, we recommend that you upgrade to Rhapsody 8.1.5 or higher.
If you cannot upgrade you can fix this issue with the following modification:
- Open /Share/LangC/aom/cygwinaom.mak. For example,
C:/Rhapsody8.1.4/Share/LangC/aom/cygwinaom.mak
- Modify line 10 so as to include the directive "-D__USE_W32_SOCKETS". For example,
ADDED_CFLAGS = $(DEFAULT_CFLAGS) -DUSE_SYS_TYPES_FD_SET -D__USE_W32_SOCKETS -I.. -I../osconfig/cygwin -DCYGWIN $(RHAP_FLAGS)
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21990096