Bug 237931 - build fails - cfmakeraw not available on Solaris
Summary: build fails - cfmakeraw not available on Solaris
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-05-17 15:10 UTC by tropikhajma
Modified: 2013-10-20 08:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2010-05-17 15:10:00 UTC
Version:            (using Devel)
Compiler:          Sun Studio 12 U1 
OS:                Solaris
Installed from:    Compiled sources

building kdeedu on OpenSolaris fails with
...
[ 81%] Building CXX object marble/src/plugins/render/aprs/CMakeFiles/AprsPlugin.dir/posix_qextserialport.o

"/.../srcdir/marble/src/plugins/render/aprs/posix_qextserialport.cpp", line 697: Error: The function "cfmakeraw" must have a prototype.


cfmakeraw is not available on Solaris, porters usually recommend to reimplement it with 
code from netbsd:

http://wiki.netbsd.se/The_pkgsrc_portability_guide#cfmakeraw
http://www.nexenta.org/os/cfmakeraw

I may be able to come up with a patch later on.
Comment 1 Dennis Nienhüser 2010-05-25 19:58:36 UTC
A patch would be cool -- I don't think we have someone else with a Solaris system around.
Comment 3 tropikhajma 2010-06-19 13:53:32 UTC
the code is identical with the NetBSD code at:

http://cvsweb.de.netbsd.org/cgi-bin/cvsweb.cgi/src/lib/libc/termios/cfmakeraw.c?rev=HEAD

which is explicitly licensed under BSD.
Comment 4 wjhns25 2010-07-02 16:01:08 UTC
I've put a patch at: http://reviewboard.kde.org/r/4510/.  I hadn't seen the other one but it's functionally the same.  I'd argue that a test for cfmakeraw would be safer than only applying "if sun"
Comment 5 wjhns25 2010-07-07 01:11:20 UTC
SVN commit 1146893 by hardaker:

BUG: 237931 - Check for cfmakeraw as some OSes (eg solaris) do not have it

 M  +6 -0      CMakeLists.txt  
 A             aprsconfig.h.in  
 M  +12 -0     posix_qextserialport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1146893
Comment 6 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 242039
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