Version: (using KDE KDE 3.1.1a) Installed from: Compiled From Sources Compiler: gcc 3.2.2 OS: Solaris When bug 58149 is fixed another problem appears in KSIM 1.0.0 Referreing to the compiletime trace below : ---------------------------- From the SunOS 4 to Solaris 2 transition Guide: ( written 10 years ago ) setmntent()(3) : The fopen()(3) followed by the lockf()(3) routines provide similar functionality. endmntent()(3) : This routine is replaced by fclose()(3). ----------------------------- getmntent() (3) : is defined in <sys/mnttab.h> Here is the compile trace. /bin/bash ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../ksim/library -I/usr/local/kde/include -I/usr/local/qt/include -DQT_THREAD_SUPPORT -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O3 -mcpu=ultrasparc -mtune=ultrasparc -Wa,-xarch=v8plusa -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -c -o fsystemconfig.lo `test -f 'fsystemconfig.cpp' || echo './'`fsystemconfig.cpp fsystemconfig.cpp: In member function `void FsystemConfig::getStats()': fsystemconfig.cpp:185: `setmntent' undeclared (first use this function) fsystemconfig.cpp:185: (Each undeclared identifier is reported only once for each function it appears in.) fsystemconfig.cpp:188: `getmntent' undeclared (first use this function) fsystemconfig.cpp:189: invalid use of undefined type `struct mntent' fsystemconfig.cpp:186: forward declaration of `struct mntent' fsystemconfig.cpp:190: invalid use of undefined type `struct mntent' fsystemconfig.cpp:186: forward declaration of `struct mntent' fsystemconfig.cpp:191: invalid use of undefined type `struct mntent' fsystemconfig.cpp:186: forward declaration of `struct mntent' fsystemconfig.cpp:191: invalid use of undefined type `struct mntent' fsystemconfig.cpp:186: forward declaration of `struct mntent' fsystemconfig.cpp:194: `endmntent' undeclared (first use this function) gmake[2]: *** [fsystemconfig.lo] Error 1 gmake[2]: Leaving directory `/opt/src/kde311/kdeutils-3.1.1/ksim/monitors/filesystem' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/opt/src/kde311/kdeutils-3.1.1/ksim/monitors' gmake: *** [all-recursive] Error 1
could you maybe remove the #ifdef HAVE_MNTENT_H and the code leading it so the other method can take over to see if that helps any? I plan on re-writing the way getStats() work to something more generic to make it easier for new methods (if needed) to be added for kde 3.2, but in the meantime this needs fixing first.
HAVE_SYS_UCRED_H is undef:ed so that logic does not work. I would not work anyway since SYSTEM V release 4 unixes evolved from using the filesystem table to the VIRTUAL filesystemtable. the systemcalls and subroutines are : fstatvfs statvfs (2) - get file system information getvfsany getvfsent (3c) - get vfstab file entry getvfsent getvfsent (3c) - get vfstab file entry getvfsfile getvfsent (3c) - get vfstab file entry getvfsspec getvfsent (3c) - get vfstab file entry statvfs statvfs (2) - get file system information vfscanf scanf (3c) - convert formatted input vfstab vfstab (4) - table of file system defaults Some Links to the VFS manpages on http://docs.sun.com http://docs.sun.com/db/doc/816-0212/6m6nd4nek?a=view#indexterm-276 http://docs.sun.com/db/doc/816-0213/6m6ne382q?a=view#indexterm-596 I am NOT demanding that this be fixed right now. I am just pointing out that this code is not very portable outside LINUX/ FreeBSD. I want KDE to work on the Main UNIX platforms.
Ok, i have a system working here that should fix your problem, but i need to find out if you have a _PATH_MOUNTED define in any of your installed headers (its in /usr/include/paths.h on linux) if you dont have such a define, could you let me know what the mtab file is called and its location if its any different to linux? once i've got this information i'll send you a patch to see if it works.
Subject: Re: Ksim 1.0.0 filesystem plugin does not build with mntent.h on Solaris. I have mailed some dumps of the Solaris 9 : mnttab manpage the /usr/include/sys/mnttab.h header file a snapshot of /etc/mnttab contents directly to the developer. //
Hi, the following patch and file should fix this, if it doesnt edit filesystemstats.cpp and add #undef HAVE_SYS_MNTTAB_H on line 85 and the failsafe option should take over, which should then fix your problem. Also, please note that you will need to rerun make -f Makefile.cvs and ./configure
Created attachment 1519 [details] solaris fsystem patch
Created attachment 1520 [details] fsystemstats.cpp
Created attachment 1521 [details] fsystemstats.h
Created attachment 1523 [details] correct solaris fsystem patch Sorry, this is the correct patch
Is this bug still present in a recent KDE version, such as 3.5.9 or 4.0.1?
Fixed in KDE 3.4.3 packages; KDE4 has transitioned to the vfs calls for Solaris.