two problems building kdelibs: kjs and kded_kdetrayproxy
Alexander Neundorf
neundorf at kde.org
Fri Jan 20 17:40:17 CET 2006
Hi,
On Friday 20 January 2006 11:15, David Faure wrote:
...
> Amazing. The warning doesn't make sense, and it works fine here.
>
> perl create_hash_table date_object.cpp -i > date_object.lut.h
> Creating hashtable for date_object.cpp
> -laptop- dfaure 11:07 /mnt/devel/kde/src/kde4-branch/kdelibs/kjs
>
> This is perl, v5.8.7 built for i386-linux
>
> Can you double check that your create_hash_table script is unmodified?
>
> >md5sum create_hash_table
>
> fe389ed621c851a7ae86f5c6717b93e3 create_hash_table
~/src/kde4-svn/kdelibs/kjs$ md5sum create_hash_table
fe389ed621c851a7ae86f5c6717b93e3 create_hash_table
It's the same. And still doesn't work.
This is the start of the generated header:
/* Automatically generated from date_object.cpp using create_hash_table. DO
NOT EDIT ! */
#include "lookup.h"
namespace KJS {
static const struct HashEntry dateTableEntries[] = {
{ "setMilliseconds", DateProtoFuncImp::SetMilliSeconds, DontEnum|Function,
1, 0 },
{ "setYear", DateProtoFuncImp::SetYear, DontEnum|Function, 1, 0 },
{ "toLocaleDateString", DateProtoFuncImp::ToLocaleDateString, DontEnum|
Function, 0, &[64] },
^^^
here the compiler stops
Any ideas ?
Name "main::nameEntries" used only once: possible typo at create_hash_table
line 171.
Creating hashtable for date_object.cpp
Use of uninitialized value in concatenation (.) or string at create_hash_table
line 171, <IN> line 440.
This is the function output(), which apparently doesn't work on my system:
sub output() {
if (!$banner) {
$banner = 1;
print "/* Automatically generated from $file using $0. DO NOT EDIT !
*/\n";
}
my $nameEntries = "${name}Entries";
$nameEntries =~ s/:/_/g;
print "\n#include \"lookup.h\"\n" if ($includelookup);
if ($useNameSpace) {
print "\nnamespace ${useNameSpace}\n{\n";
print "\nusing namespace KJS;";
} else {
print "\nnamespace KJS {\n";
}
print "\nstatic const struct HashEntry ".$nameEntries."[] = {\n";
my $i = 0;
#print STDERR "writing out table with ".($#table+1)." entries\n";
foreach $entry (@table) {
if (defined($entry)) {
my $key = $keys[$entry];
print " \{ \"" . $key . "\"";
print ", " . $values[$entry];
print ", " . $attrs[$entry];
print ", " . $params[$entry];
print ", ";
if (defined($links[$i])) {
print "&${nameEntries}[$links[$i]]" . " \}";
The last line is line 171, where my perl complains about "nameEntries".
nameEntries is used in the lines above, I guess the & and the $ and the {}
have some special meaning which make it break.
The following patch seems to make it work, i.e. the script runs without
warnings and the compiler compiles the result:
~/src/kde4-svn/kdelibs/kjs$ svn diff create_hash_table
Index: create_hash_table
===================================================================
--- create_hash_table (revision 500301)
+++ create_hash_table (working copy)
@@ -168,7 +168,7 @@
print ", " . $params[$entry];
print ", ";
if (defined($links[$i])) {
- print "&${nameEntries}[$links[$i]]" . " \}";
+ print "&${name}Entries[$links[$i]]" . " \}";
} else {
print "0 \}"
}
Is this change correct ? (I know nothing about perl)
Bye
Alex
--
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org - http://www.kde.org
alex AT neundorf.net - http://www.neundorf.net
More information about the Kde-buildsystem
mailing list