Bug 242039 - build fails - FIONREAD is not defined
Summary: build fails - FIONREAD is not defined
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: 0.8 (KDE 4.3)
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 01:32 UTC by tropikhajma
Modified: 2013-10-20 08:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2010-06-18 01:32:49 UTC
Version:           unspecified (using Devel) 
OS:                Solaris

building kdeedu 4.4.85 on opensolaris fails with the below message.

on solaris one has to add the <sys/filio.h> include for FIONREAD (http://solaris.bionicmutton.org/hg/kde4-specs-450/rev/2a63e473de65)



pkgbuild: cd /export/home/test/packages/BUILD/kdeedu-4.4.85/build-kdeedu-4.4.85/marble/src/plugins/render/aprs && /opt/sunstudio12.1/bin/CC  -library=no%Cstd -library=Crun -xannotate=no  -DMAKE_APRSPLUGIN_LIB -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DMARBLE_DBUS -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -D__EXTENSIONS__ -DSOLARIS -D_REENTRANT -DNDEBUG -D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS -DSOLARIS10 -DNO_DEBUG -D_UNICODE -DUNICODE -D_RWSTD_REENTRANT  -D_XOPEN_SOURCE=500 -D_XPG5  -I/usr/include/stdcxx4/ansi -I/usr/include/stdcxx4 -I/opt/kde4/include -I/usr/include/stdcxx4/ansi -I/usr/include/stdcxx4 -library=no%Cstd -library=Crun -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -s -xdebugformat=dwarf -xlang=c99 -xustr=ascii_utf16_ushort -Qoption ccfe -features=gcc -Qoption ccfe -features=zla -Qoption ccfe ++boolflag:sunwcch=false -mt -xF=%none -xbuiltin=%all -xinline=%auto -xprefetch=auto -xprefetch_auto_type=indirect_array_access -xprefetch_level=3 -KPIC -DPIC -xipo=0 -xO3 -xregs=no%frameptr -xjobs=2 -xrestrict=%all -xthreadvar=%all -z combreloc -z redlocsym -z nodefaultlib -z ignore -z now -z rescan -z absexec -xldscope=symbolic -xlibmil -s -xtarget=pentium4 -m32 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8 -lc -lm -ldl -lpthread -lposix4 -lrt -mt -L/opt/kde4/lib -R/opt/kde4/lib -L/usr/lib -R/usr/lib -Y P,/opt/kde4/lib -i -L/opt/kde4/lib -R/opt/kde4/lib -L/usr/lib -R/usr/lib -Bdynamic -lstdcxx4 -lCrun -lc -lm -xannotate=no   -DQT_NO_DEBUG -KPIC -I/export/home/test/packages/BUILD/kdeedu-4.4.85/build-kdeedu-4.4.85/marble/src/plugins/render/aprs -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/plugins/render/aprs -I/export/home/test/packages/BUILD/kdeedu-4.4.85 -I/export/home/test/packages/BUILD/kdeedu-4.4.85/build-kdeedu-4.4.85 -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/AbstractLayer -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/Projections -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata/data -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata/graphicsitem -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata/handlers/dgml -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata/parser -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata/writer -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/geodata/scene -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/graphicsview -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/lib/graphicsview/screengraphicsitem -I/export/home/test/packages/BUILD/kdeedu-4.4.85/build-kdeedu-4.4.85/marble/src -I/export/home/test/packages/BUILD/kdeedu-4.4.85/build-kdeedu-4.4.85/marble/src/lib -I/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/plugins/render/aprs/src/plugins/render/aprs -I/export/home/test/packages/BUILD/kdeedu-4.4.85/build-kdeedu-4.4.85/src/plugins/render/aprs -I/opt/kde4/include -I/opt/kde4/include/KDE -I/opt/kde4/include/QtXmlPatterns -I/opt/kde4/include/QtXml -I/opt/kde4/include/QtWebKit -I/opt/kde4/include/QtUiTools -I/opt/kde4/include/QtTest -I/opt/kde4/include/QtSvg -I/opt/kde4/include/QtSql -I/opt/kde4/include/QtScriptTools -I/opt/kde4/include/QtScript -I/opt/kde4/include/QtOpenGL -I/opt/kde4/include/QtNetwork -I/opt/kde4/include/QtMultimedia -I/opt/kde4/include/QtHelp -I/opt/kde4/include/QtDesigner -I/opt/kde4/include/QtDBus -I/opt/kde4/include/QtAssistant -I/opt/kde4/include/Qt3Support -I/opt/kde4/include/QtGui -I/opt/kde4/include/QtCore -I/opt/kde4/include/Qt -I/opt/kde4/share/mkspecs/default -I/usr/X11/include    -D_LARGEFILE64_SOURCE -o CMakeFiles/AprsPlugin.dir/posix_qextserialport.o -c /export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/plugins/render/aprs/posix_qextserialport.cpp
pkgbuild: "/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/plugins/render/aprs/posix_qextserialport.cpp", line 781: Error: FIONREAD is not defined.
pkgbuild: "/export/home/test/packages/BUILD/kdeedu-4.4.85/marble/src/plugins/render/aprs/posix_qextserialport.cpp", line 796: Error: FIONREAD is not defined.

Reproducible: Always
Comment 1 wjhns25 2010-07-02 15:41:12 UTC
I have a fix to this now in the reviewboard: http://reviewboard.kde.org/r/4509/
Comment 2 tropikhajma 2010-07-07 18:48:42 UTC
confirming the reviewboard fix works, I only had to modify the line in
marble/src/plugins/render/aprs/aprsconfig.h.in to read
#cmakedefine HAVE_SYS_FILIO_H 1
Comment 3 wjhns25 2010-07-07 19:42:26 UTC
SVN commit 1147240 by hardaker:

BUG: 242039 - Add a CMake test for checking existence and including of sys/filio.h

 M  +3 -0      CMakeLists.txt  
 M  +2 -1      aprsconfig.h.in  
 M  +3 -0      posix_qextserialport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1147240
Comment 4 tropikhajma 2010-09-18 21:59:33 UTC
I had to add 
#include "aprsconfig.h"
to make it working:
http://solaris.bionicmutton.org/hg/kde4-specs-460/rev/e3d13ce3f79a
Comment 5 tropikhajma 2010-11-20 22:45:38 UTC
sorry to reopen, but I still need the change in comment#4 to make it working
Comment 6 tropikhajma 2010-12-04 13:51:03 UTC
SVN commit 1203522 by pavelheimlich:

actually use aprsconfig.h from rev 1146893. Fixes build on Solaris
BUG:242039


 M  +1 -0      posix_qextserialport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1203522
Comment 7 Pino Toscano 2012-12-15 09:11:15 UTC
Git commit f8ea7ba60fa3d3bca313e1c3b440ed7173245cc8 by Pino Toscano.
Committed on 30/11/2012 at 19:09.
Pushed by pino into branch 'master'.

aprs: use external QextSerialPort for TTY reading

Instead of embedding an (old) copy of the QextSerialPort library, find for an external one;
only if found enable the reading from TTY, which is otherwise disabled (leaving its configuration tab disabled).

The drop of the internal QextSerialPort should also fix all the portability issues,
since the plugin itself does not use any OS-dependent API, and it is then reenabled unconditionally.
Hence,
Related: bug 241125, bug 237931
should now be fixed, and
should not happen anymore.

REVIEW: 107536

A  +16   -0    cmake/modules/FindQextSerialPort.cmake
M  +1    -3    src/plugins/render/CMakeLists.txt
M  +17   -2    src/plugins/render/aprs/AprsPlugin.cpp
M  +2    -1    src/plugins/render/aprs/AprsTTY.cpp
M  +10   -13   src/plugins/render/aprs/CMakeLists.txt
M  +2    -2    src/plugins/render/aprs/aprsconfig.h.in
D  +0    -979  src/plugins/render/aprs/posix_qextserialport.cpp
D  +0    -262  src/plugins/render/aprs/qextserialport.cpp
D  +0    -338  src/plugins/render/aprs/qextserialport.h
D  +0    -21   src/plugins/render/aprs/qextserialport_global.h
D  +0    -874  src/plugins/render/aprs/win_qextserialport.cpp

http://commits.kde.org/marble/f8ea7ba60fa3d3bca313e1c3b440ed7173245cc8