Bug 65429 - compliling aborts at kdeedu
Summary: compliling aborts at kdeedu
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-03 18:31 UTC by ashish agarwal
Modified: 2003-11-09 04:06 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 ashish agarwal 2003-10-03 18:31:37 UTC
Version:            (using KDE KDE 3.1.92)
Installed from:    Compiled From Sources
OS:          Linux

I have downloaded Konstruct & I started getting KDE 3.2-alpha2 
from it.
I enetered meta/everything & gave the command make install.
Everything went fine till the install of kdeedu started.
The installation aborted at 'kstars' .I retried the entire thing in a fresh installation but the same problem was encountered.
Even my friend encountered the same problem.
I am using  'RED HAT 9'

The following are the last few lines when the error was encountered.

make[4]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kpercentage'


Making all in kstars
make[4]: Entering directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars'
Making all in kstars
make[5]: Entering directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars'
Making all in data
make[6]: Entering directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars/data'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars/data'
Making all in indi
make[6]: Entering directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars/indi'
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..   -DQT_THREAD_SUPPORT -I/home/ashish/kde3.2-alpha2/include -I/usr/X11R6/include -I/home/ashish/kde3.2-alpha2/include -I/usr/X11R6/include -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -I/home/ashish/kde3.2-alpha2/include -I/usr/X11R6/include -L/home/ashish/kde3.2-alpha2/lib -L/usr/X11R6/lib -O2 -pipe -I/home/ashish/kde3.2-alpha2/include -I/usr/X11R6/include -L/home/ashish/kde3.2-alpha2/lib -L/usr/X11R6/lib -O2 -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT lx200generic.all_cpp.o -MD -MP -MF ".deps/lx200generic.all_cpp.Tpo" \
  -c -o lx200generic.all_cpp.o `test -f 'lx200generic.all_cpp.cpp' || echo './'`lx200generic.all_cpp.cpp; \
then mv -f ".deps/lx200generic.all_cpp.Tpo" ".deps/lx200generic.all_cpp.Po"; \
else rm -f ".deps/lx200generic.all_cpp.Tpo"; exit 1; \
fi
In file included from lx200generic.h:24,
                 from lx200autostar.h:24,
                 from lx200autostar.cpp:26,
                 from lx200generic.all_cpp.cpp:2:
indiapi.h:108: warning: non-static const member `const IPerm <anonymous
   struct>::p' in class without a constructor
indiapi.h:112: warning: non-static const member `const int <anonymous
   struct>::nt' in class without a constructor
indiapi.h:119: warning: non-static const member `const double <anonymous
   struct>::min' in class without a constructor
indiapi.h:119: warning: non-static const member `const double <anonymous
   struct>::max' in class without a constructor
indiapi.h:120: warning: non-static const member `const double <anonymous
   struct>::step' in class without a constructor
indiapi.h:129: warning: non-static const member `const IPerm <anonymous
   struct>::p' in class without a constructor
indiapi.h:133: warning: non-static const member `const int <anonymous
   struct>::nn' in class without a constructor
indiapi.h:147: warning: non-static const member `const IPerm <anonymous
   struct>::p' in class without a constructor
indiapi.h:148: warning: non-static const member `const ISRule <anonymous
   struct>::r' in class without a constructor
indiapi.h:152: warning: non-static const member `const int <anonymous
   struct>::nsw' in class without a constructor
indiapi.h:168: warning: non-static const member `const int <anonymous
   struct>::nl' in class without a constructor
In file included from lx200generic.all_cpp.cpp:2:
lx200autostar.cpp:41: warning: deprecated conversion from string constant to `
   char*'
lx200autostar.cpp:41: warning: deprecated conversion from string constant to `
   char*'
lx200autostar.cpp:41: warning: deprecated conversion from string constant to `
   char*'
lx200autostar.cpp:41: warning: deprecated conversion from string constant to `
   char*'
lx200autostar.cpp:41: warning: deprecated conversion from string constant to `
   char*'
In file included from lx200generic.all_cpp.cpp:3:
lx200_16.cpp: In member function `void LX200_16::handleAltAzSlew()':
lx200_16.cpp:322: warning: deprecated conversion from string constant to `char*
   '
In file included from lx200generic.all_cpp.cpp:4:
lx200gps.cpp: In member function `virtual void LX200GPS::ISNewSwitch(const
   char*, const char*, ISState*, char**, int)':
lx200gps.cpp:255: warning: deprecated conversion from string constant to `char*
   '
In file included from lx200generic.all_cpp.cpp:5:
lx200generic.cpp: At global scope:
lx200generic.cpp:88: warning: deprecated conversion from string constant to `
   char*'
lx200generic.cpp:120: warning: deprecated conversion from string constant to `
   char*'
lx200generic.cpp:139: warning: deprecated conversion from string constant to `
   char*'
In file included from lx200generic.all_cpp.cpp:6:
lx200classic.cpp:29: structure `eqNum' with uninitialized const members
lx200classic.cpp:36: warning: deprecated conversion from string constant to `
   char*'
lx200classic.cpp:48: warning: aggregate has a partly bracketed initializer
make[6]: *** [lx200generic.all_cpp.o] Error 1
make[6]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars/indi'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ashish/konstruct/kde/kdeedu/work/kdeedu-3.1.92'
make[1]: *** [build-work/kdeedu-3.1.92/Makefile] Error 2
make[1]: Leaving directory `/home/ashish/konstruct/kde/kdeedu'
make: *** [dep-../../kde/kdeedu] Error 2
[ashish@ashish everything]$
Comment 1 Thiago Macieira 2003-10-04 03:26:36 UTC
You're compiling a CVS version. Please update your sources and try again until it works. If it 
doesn't correct itself, please post to a mailing list so that the maintainer can correct the 
problem. 
 
Please don't use the Bug Tracking System for CVS compilation problems. 
Comment 2 Stephan Binner 2003-10-09 21:37:56 UTC
Thiago, he compiled a released tarball which I can promise you compiled for me. 
Comment 3 dude 2003-10-20 16:52:30 UTC
I'm having this exact same issue with redhat 9, gcc 3.2.2
Comment 4 dude 2003-10-20 16:54:10 UTC
Forgot to mention I'm using konstruct unstable to compile: cd meta/kde;make install
Comment 5 Thiago Macieira 2003-10-27 19:35:43 UTC
Can anyone still reproduce this problem with current CVS? If so, please speak up so that we can find the problem before 3.2 beta 1 is tagged.
Comment 6 kstars 2003-10-27 20:28:38 UTC
Subject: Re:  compliling aborts at kdeedu

Just some more information.  The relevant error message is:

  lx200classic.cpp:29: structure `eqNum' with uninitialized const members 
 
eqNum is a struct with const members, which *are* initialized in 
lx200generic.cpp.  In lx200classic.cpp, we reference it with 'extern 
INumberVectorProperty eqNum;'.  Most compilers seem to be fine with this; for 
some reason, gcc 3.2.2 on Redhat9 has a problem with it.  If anyone has an 
idea how this can be resolved, please let us know (none of us has the magic 
combination of RH9 and gcc 3.2.2)

regards,
Jason
Comment 7 Ajrarn 2003-11-01 08:59:47 UTC
Subject: KDE/1.2b1/GCC 3.2.2/Mdk 9.1

Hello,

I Have exactly the same problem with Mandrake 9.1/gcc 3.2.2. I found a way 
just by commenting the eqNum declaration (but I don't know if KStarts will 
launch without ;) 

Mail me if you need more informations

Best regards. Yoran

In file included from lx200generic.all_cpp.cpp:3:
lx200_16.cpp: In member function `void LX200_16::handleAltAzSlew()':
lx200_16.cpp:322: warning: deprecated conversion from string constant to 
`char*'
In file included from lx200generic.all_cpp.cpp:4:
lx200gps.cpp: In member function `virtual void LX200GPS::ISNewSwitch(const 
char*, const char*, ISState*, char**, int)':
lx200gps.cpp:255: warning: deprecated conversion from string constant to 
`char*'
In file included from lx200generic.all_cpp.cpp:5:
lx200generic.cpp: At global scope:
lx200generic.cpp:88: warning: deprecated conversion from string constant to 
`char*'
lx200generic.cpp:120: warning: deprecated conversion from string constant to 
`char*'
lx200generic.cpp:139: warning: deprecated conversion from string constant to 
`char*'
In file included from lx200generic.all_cpp.cpp:6:
lx200classic.cpp:29: structure `eqNum' with uninitialized const members
lx200classic.cpp:36: warning: deprecated conversion from string constant to 
`char*'
lx200classic.cpp:48: warning: aggregate has a partly bracketed initializer
make[6]: *** [lx200generic.all_cpp.o] Erreur 1
make[6]: Leaving directory 
`/usr/src/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars/indi'
make[5]: *** [all-recursive] Erreur 1
make[5]: Leaving directory 
`/usr/src/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars/kstars'
make[4]: *** [all-recursive] Erreur 1
make[4]: Leaving directory 
`/usr/src/konstruct/kde/kdeedu/work/kdeedu-3.1.92/kstars'
make[3]: *** [all-recursive] Erreur 1
make[3]: Leaving directory `/usr/src/konstruct/kde/kdeedu/work/kdeedu-3.1.92'
make[2]: *** [all] Erreur 2
make[2]: Leaving directory `/usr/src/konstruct/kde/kdeedu/work/kdeedu-3.1.92'
make[1]: *** [build-work/kdeedu-3.1.92/Makefile] Erreur 2
make[1]: Leaving directory `/usr/src/konstruct/kde/kdeedu'
make: *** [dep-../../kde/kdeedu] Erreur 2

Comment 8 Eike Hein 2003-11-04 06:55:17 UTC
Same error. Can't compile it in Beta1. Which really sucks, because I have no idea to get Beta1 working now (newbie). Oh well.
Comment 9 Andrew W. Buchanan 2003-11-04 16:01:36 UTC
I'm going to chime in with a "me too" :(
I am also using RedHat 9 with gcc-3.2.2
Comment 10 Alex Blyth 2003-11-05 12:17:57 UTC
I also got this on MDK9.1/KDE3.2Beta1. Compiling using konstruct. Commented out line 29 in lx200classic.cpp and compile carried on (but Ive probably killed kstars)
Comment 11 kstars 2003-11-05 14:04:49 UTC
Subject: Re:  compliling aborts at kdeedu

On Wednesday 05 November 2003 06:17 am, you wrote:
> Commented out line 29 in lx200classic.cpp and compile carried on (but Ive
> probably killed kstars)

Well, can you check whether you've killed KStars?  It's possible you've only 
killed (or injured ;) the telescope control functionality (to which 
lx200classic.cpp belongs).  If the rest of KStars still works, maybe this can 
be a workaround for now.

Thanks, please post your results to 65429@bugs.kde.org so everyone else can 
see whether it will work.

regards,
Jason
Comment 12 Alejandro Exojo 2003-11-05 21:01:34 UTC
I noticed the same problem using Debian Woody (gcc 2.95.4), also using konstruct. Commenting line 29 fix the problem, and I don't understand why. I think is just a gcc bug, because I had the same problem compiling other non-kde apps that use external variables :-(.
Comment 13 Brint 2003-11-05 23:14:14 UTC
I also recieved the error using gcc 3.2.3 on Slackware 9.1. Commenting out the line 29 allowed it to compile, not sure what the loss of features will be.
Comment 14 Jasem Mutlaq 2003-11-06 00:44:03 UTC
Subject: kdeedu/kstars/kstars/indi

CVS commit by mutlaqja: 

I'm not sure if this would solve bug 65429, but give it a try.

CCMAIL: kstars-devel@kde.org
CCMAIL: 65429@bugs.kde.org


  M +1 -1      lx200generic.cpp   1.15


--- kdeedu/kstars/kstars/indi/lx200generic.cpp  #1.14:1.15
@@ -73,5 +73,5 @@ static ISwitch  FocusMotionS[]	 = { {"Fo
 
 /* equatorial position */
-static INumber eq[] = {
+INumber eq[] = {
     {"RA",  "RA  H:M:S", "%10.6m",  0., 24., 0., 0.},
     {"DEC", "Dec D:M:S", "%10.6m", -90., 90., 0., 0.},


Comment 15 Jasem Mutlaq 2003-11-06 06:59:19 UTC
"Commented out line 29 in lx200classic.cpp and compile carried on"

Commenting line 29 will naturally result in a compiler error since lx200classic.cpp does not know anything about eqNum which is defined in lx200generic.cpp. This is really odd, time to ask some C++ wizzies.
Comment 16 Jasem Mutlaq 2003-11-06 07:43:22 UTC
From the compiliation

" -c -o lx200generic.all_cpp.o `test -f 'lx200generic.all_cpp.cpp' || echo './'`lx200generic.all_cpp.cpp; \ 
 then mv -f ".deps/lx200generic.all_cpp.Tpo" ".deps/lx200generic.all_cpp.Po"; \ 
 else rm -f ".deps/lx200generic.all_cpp.Tpo"; exit 1; \ 
"

Why do we have lx200generic.all_cpp.cpp ? Is this normal?



Comment 17 Anne-Marie Mahfouf 2003-11-06 15:04:38 UTC
ok, I ran some tests since yesterday with both cvs HEAD and kde-3.2 beta 1 and the cause of that error is
--enable-final 
as a configure option.
konstruct uses that option so if you suppress it in the kdeedu module it compiles all fine (both in HEAD and in beta 1)

For cvs HEAD from today, if you configure with --enable-final, it also fails.

I cannot say why --enable-final causes this error but at least we now know it is the cause.

annma
Comment 18 Jasem Mutlaq 2003-11-06 16:41:32 UTC
Well, this is what enable-final does:

--enable-final:
Concatenates all .cpp files into one big .all_cpp.cpp file, and compiles it in one go, instead of compiling each .cpp file on its own. This makes the whole compilation much faster, and often leads to better optimised code, but it also requires much more memory. And it often results in compilation errors when headers included by different source files clash one with the other, or when using c static functions with the same name in different source files. 

------------------------
This explains why we only compile one file, lx200generic.all_cpp.cpp, and this explains why commenting 'extern INumberVectorProperty eqNum' works when it shouldn't. I don't know how enable-final constructs the .all_cpp file, but it's not done correctly (or cannot be done), and therefore, we must remove -enable-final.

Those who didn't use konstruct apparently didn't have the issue, so we might alter konstruct authors to this issue to get it resolved.
Comment 19 Stephan Binner 2003-11-06 16:59:32 UTC
The "solution" is to put "KDE_OPTIONS = nofinal" into kstar's Makefile.am if you know that this single package doesn't compile with --enable-final.
Comment 20 Stephan Binner 2003-11-06 17:10:38 UTC
*** Bug has been marked as fixed ***.
Comment 21 Michael Dean 2003-11-09 04:06:04 UTC
I had this same problem with RedHat 9, with both alpha2 and beta1.

Your (Stephan Binner) method of fixing it should work, if you really don't need that struct to be a static data member.  My solution when I encounter the problem was to edit the INumberVectorProperty struct, lines 124-134 of kstars/indi/indiapi.h to remove all const declarations.  As you know, you cannot have uninitialised static const members, and since I assumed the lx200generic.all_cpp.cpp file needed its instance of the struct to be static (and since the const qualifiers wouldn't matter, since that's for the protection of the programmer, but I'm not hacking on it) it seemed like the best fix.

I just wanted to point this out in case there was a reason lx200generic.all_cpp.cpp needs this struct to be static, and Elwood C. Downey is apparently the name of the guy who wrote the code.  It seems like it might be a safer fix to commit to CVS.  Just my two cents.  Hope this helps.