Version: 3.4.0 (using KDE KDE 3.5.5) Installed from: Compiled From Sources Compiler: gcc 3.4.6 OS: Solaris I get this compile error on Solaris 8: gmake[4]: Entering directory `/inta/cad4/stevee/kde_build/kdevelop-3.4.0/vcs/clearcase' if /bin/bash ../../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../lib/interfaces -I../../lib/interfaces/extensions -I../../lib/util -I/opt/kde/include -I/opt/qt/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -DQT_THREAD_SUPPORT -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -Wno-long-long -Wundef -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/gnome2/include/glib-2.0 -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -O2 -fomit-frame-pointer -DNeedVarargsPrototypes=1 -DNeedFunctionPrototypes=1 -pipe -fno-exceptions -mcpu=ultrasparc -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT clearcasemanipulator.lo -MD -MP -MF ".deps/clearcasemanipulator.Tpo" -c -o clearcasemanipulator.lo clearcasemanipulator.cpp; \ then mv -f ".deps/clearcasemanipulator.Tpo" ".deps/clearcasemanipulator.Plo"; else rm -f ".deps/clearcasemanipulator.Tpo"; exit 1; fi clearcasemanipulator.cpp: In member function `VCSFileInfoMap* ClearcaseManipulator::retreiveFilesInfos(const QString&)': clearcasemanipulator.cpp:98: error: `getline' was not declared in this scope getline() is a gnu libc function that is not available in other libc implementations, so should not really be used in code that is intended to be portable. The man page for getline on linux says: Both getline() and getdelim() are GNU extensions. They are available since libc 4.6.27.
Can you provide a patch? The clearcase support is pretty much unmaintained, AFAIK and I doubt any of the core devs has access to Solaris machines. So unless you can come up with a patch, I guess this won't be fixed in kdevelop3. Of course you can easily disable clearcase support via configure --disable-clearcase
OK, I'll take the easy way out then and disable clearcase support as I don't need it. Someone must have done some work on clearcase, because version 3.3.6 of kdevelop doesn't have the problem. In fact the source file clearcasemanipulator.cpp doesn't exist in that version :-)
uhm, seems you're right. Alexander Dymo did some work during spring last year. I'll ping him later today on IRC and point him to this bugreport, maybe he can solve it...
Actually we have its getline implementation in the code and it's used when MACOSX is defined. So you could either call compiler with -DMACOSX or remove defines surrounding getline definition in clearcasemanipulator.cpp#26. PS: define is called MACOSX because KDevelop was tested only on Linux and MacOS ;)
There might be a memory leak using getline since the buffer is allocated on the heap. I don't see it getting freed anywhere unless somehow QString frees it. In looking at the getline code I also am not sure what the behavior is on different platforms when calling realloc with a pointer on the stack. I could see this possibly causing a crash since this behavior is not described in the Solaris man page.
Rather than calling realloc, why not use malloc/calloc? Also, the man page for getline says it includes the EOL character which the source is removing.
This problem causes a build failure on OpenSolaris (Solaris Express B78) using Gcc 3.4.3. The Q_OS_SOLARIS predefined macro from QT can be used in the preprocessor check. Patch attached.
Created attachment 23235 [details] Enable provided getline implementation on Solaris
SVN commit 765689 by apaku: Use our own getline also on Solaris which misses it as well. BUG:140907 M +1 -1 clearcasemanipulator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=765689
Getline is pretty much a glibc-exclusive. It would be best to avoid it altogether. In any case, please add Q_OS_FREEBSD to that #ifdef as well please.
SVN commit 782252 by apaku: Also add Q_OS_FREEBSD as requested from Michael Nottebrock. CCBUG:140907 M +1 -1 clearcasemanipulator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=782252