The package at the moment builds on Debian because it does not use the new gcc version which now also fails when a const char* is used as a char*. This made the package FTBFS on Ubuntu karmic which already uses the new gcc version.

Hm, as I checked the new version of gambas2 in Debian I see that upstream has "fixed" those invalid conversions by casting the const char* to char*. (I only checked the Debian changelog to see if there was a patch introduced which fixes the conversions. But I did not check if upstream fixed that for themselves. Sorry.)

But the second patch which is in my new debdiff still should be of interest because the getPDFVersion() function has been removed in libpoppler.

José Luis Redrejo Rodríguez schrieb:
I'm sorry, but I don't understand your bug report because:
- gambas 2.13.1 is not in Debian
- What architecture is failing to build from source according to your
experience? According to https://buildd.debian.org/pkg.cgi?pkg=gambas2 there
is a problem only in freebsd, but I don't thing you're refering to that
arch.

Cheers.

José L.

2009/9/19 Christoph Korn <c_k...@gmx.de>

Package: gambas2
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu karmic ubuntu-patch
Version: 2.13.1-1
Severity: important
Justification: fails to build from source
Tags: patch

*** Please type your report below this line ***
The package does not build from source because of:
main.cpp:1011: error: invalid conversion from 'const char*' to 'char*'

*** /tmp/tmpIW2yFt
In Ubuntu, we've applied the attached patch to achieve the following:

  * debian/patches/03_fix_const_char_conversion.patch:
    - It fixes a FTBFS due to a conversion from const char*
      to char* (LP: #432792)

We thought you might be interested in doing the same.


-- System Information:
Debian Release: 5.0
  APT prefers jaunty-updates
  APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500,
'jaunty-backports'), (500, 'jaunty')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28-15-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash


diff -u gambas2-2.13.1/debian/patches/00list
gambas2-2.13.1/debian/patches/00list
--- gambas2-2.13.1/debian/patches/00list
+++ gambas2-2.13.1/debian/patches/00list
@@ -2,0 +3 @@
+03_fix_const_char_conversion.patch
only in patch2:
unchanged:
--- gambas2-2.13.1.orig/debian/patches/03_fix_const_char_conversion.patch
+++ gambas2-2.13.1/debian/patches/03_fix_const_char_conversion.patch
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_fix_const_char_conversion.patch
+## DP: Fixes FTBFS due to invalid conversion from const char* to char*
+
+...@dpatch@
+
+--- gambas2-2.13.1.orig/gb.db.sqlite3/src/main.cpp
++++ gambas2-2.13.1/gb.db.sqlite3/src/main.cpp
+@@ -36,6 +36,7 @@
+ #include <sys/stat.h>
+ #include <dirent.h>
+ #include <unistd.h>
++#include <cassert>
+
+ #include "sqlitedataset.h"
+
+@@ -1007,13 +1008,21 @@
+ static int field_index(DB_RESULT result, const char *name, DB_DATABASE *
db)
+ {
+       char *fld;
++      char *s;
++      int ret;
++
++      s = strdup(name);
++      assert(s != NULL);
+
+-      fld = strchr(name, (int) FLD_SEP);
++      fld = strchr(s, (int) FLD_SEP);
+       if (fld)
+       {
                                                    //Includes table
identity
+               fld[0] = '.';
+       }
+-      return (((Dataset *) result)->fieldIndex(name));
++
++      ret = (((Dataset *) result)->fieldIndex(s));
++      free(s);
++      return ret;
+ }
+
+







--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to