Bug 99335

Summary: kdebase-3.3.92/kcontrol/kfontinst/kfontinst/Mail.cpp doesn't compile on Solaris 2.6 - getopt.h not available
Product: kcontrol Reporter: Steve Evans <stevee>
Component: kcmfontinstAssignee: Craig Drummond <craig>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: Modified version of kfontinst/Main.cpp

Description Steve Evans 2005-02-14 10:45:08 UTC
Version:            (using KDE KDE 3.3.92)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 
OS:                Solaris

I get this compile error:

if g++ -DHAVE_CONFIG_H -I. -I. -I../../..  -DOS_Solaris -I./../lib -I./../../fonts -I/opt/kde/include -I/opt/qt/include   -I/gorbag/exta/cad/externals/SOLARIS/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/gorbag/exta/cad/externals/SOLARIS/include/freetype2 -I/gorbag/exta/cad/externals/SOLARIS/include   -DQT_THREAD_SUPPORT -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -D_FILE_OFFSET_BITS=32 -D_LARGE_FILES=1  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -O2 -fomit-frame-pointer -DNeedVarargsPrototypes=1 -DNeedFunctionPrototypes=1 -pipe -fno-exceptions -mcpu=ultrasparc -fno-exceptions -fno-check-new -fno-common -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -D_GNU_SOURCE  -MT Main.o -MD -MP -MF ".deps/Main.Tpo" -c -o Main.o Main.cpp; \
then mv -f ".deps/Main.Tpo" ".deps/Main.Po"; else rm -f ".deps/Main.Tpo"; exit 1; fi
Main.cpp:36:20: getopt.h: No such file or directory

Solaris 2.6 does not have getopt.h and its associated getopt_long functions, it only has getopt(), declared in unistd.h
Comment 1 Steve Evans 2005-02-14 10:46:11 UTC
That should have been Main.cpp, not Mail.cpp :-(
Comment 2 Craig Drummond 2005-02-16 12:10:37 UTC
Created attachment 9667 [details]
Modified version of kfontinst/Main.cpp
Comment 3 Craig Drummond 2005-02-16 12:11:59 UTC
Can you try the Main.cpp at http://bugs.kde.org/attachment.cgi?id=9667&action=view and see if this fixes the problem. Thanks.
Comment 4 Steve Evans 2005-02-16 12:16:28 UTC
Yes, that compiles. Thanks.
Comment 5 Bernd Kuhls 2005-02-16 13:32:04 UTC
Had the same problem, but the new file compiled cleanly here, thanks!

SunOS sunray 5.9 Generic_117171-14 sun4u sparc SUNW,Sun-Fire-880 Solaris
gcc version 3.3.5
Comment 6 Craig Drummond 2005-02-22 16:15:03 UTC
Can you confirm that the latest Main.cpp in CVS...

http://webcvs.kde.org/*checkout*/kdebase/kcontrol/kfontinst/kfontinst/Main.cpp?rev=1.12

...fixes the problem? If so I'll close the bug report.
Comment 7 Steve Evans 2005-02-22 17:46:23 UTC
Yes. the Main.cpp in CVS fixes the problem. Thanks.
Comment 8 Craig Drummond 2005-02-23 00:10:56 UTC
*** Bug has been marked as fixed ***.
Comment 9 Bernd Kuhls 2005-02-23 15:39:31 UTC
Confirmed working in Solaris 2.9, still having problems with bug #99336