Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923739 - dev-db/pgmodeler-0.9.4 with dev-libs/libxml2-2.12.0: src/xmlparser.cpp:182:42: error: invalid conversion from ‘const xmlError*’ {aka ‘const _xmlError*’} to ‘xmlError*’ {aka ‘_xmlError*’} [-fpermissive]
Summary: dev-db/pgmodeler-0.9.4 with dev-libs/libxml2-2.12.0: src/xmlparser.cpp:182:42...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords: PATCH, UPSTREAM
Depends on:
Blocks: libxml2-2.12
  Show dependency tree
 
Reported: 2024-02-03 18:03 UTC by Aurelien Minet
Modified: 2024-11-27 23:18 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for current stable 1.0.6 (pgmodeler-1.0.6.ebuild,1.25 KB, application/vnd.gentoo.ebuild)
2024-02-03 18:06 UTC, Aurelien Minet
Details
pacth for pgmodeler 1.0.6 to build against libxml2-2.12.4 (pgmodeler-1.0.6-libxml2-2.12_compat.patch,604 bytes, patch)
2024-02-03 18:08 UTC, Aurelien Minet
Details | Diff
pgmodeler-1.1.0.ebuild (pgmodeler-1.1.0.ebuild,1.15 KB, text/plain)
2024-03-06 01:34 UTC, Louis Frayser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Minet 2024-02-03 18:03:49 UTC
Build fails with
src/xmlparser.cpp: In member function ‘void XmlParser::readBuffer()’:
src/xmlparser.cpp:182:42: error: invalid conversion from ‘const xmlError*’ {aka ‘const _xmlError*’} to ‘xmlError*’ {aka ‘_xmlError*’} [-fpermissive]
  182 |                 xml_error=xmlGetLastError();


Reproducible: Always

Steps to Reproduce:
1. emerge =dev-libs/libxml2-2.12.4
2. emerge =dev-db/pgmodeler-0.9.4

Actual Results:  
Build fails with
src/xmlparser.cpp: In member function ‘void XmlParser::readBuffer()’:
src/xmlparser.cpp:182:42: error: invalid conversion from ‘const xmlError*’ {aka ‘const _xmlError*’} to ‘xmlError*’ {aka ‘_xmlError*’} [-fpermissive]
  182 |                 xml_error=xmlGetLastError();

Expected Results:  
build succeeded

The newt release 1.0.7 include the fix:
https://github.com/pgmodeler/pgmodeler/commit/30a94181f9ea35404b5665004bfe90a18ec9ac81
Comment 1 Aurelien Minet 2024-02-03 18:06:57 UTC
Created attachment 884155 [details]
ebuild for current stable 1.0.6

must be patched to build (patch in the next attachment)
Comment 2 Aurelien Minet 2024-02-03 18:08:29 UTC
Created attachment 884156 [details, diff]
pacth for pgmodeler 1.0.6 to build against libxml2-2.12.4

correspond to https://github.com/pgmodeler/pgmodeler/commit/fb64e2fbf4e62a96031e46774937f97c170f0cd6
Comment 3 Louis Frayser 2024-03-06 01:34:10 UTC
Created attachment 886770 [details]
pgmodeler-1.1.0.ebuild

I've patched pgmodeler-x.x.x/libs/libparsers/src/xmlparser.cpp
for 1.0.5, 1.0.6 in the past.  Today, I got curious and went to pgmodeler.io, then to github where I found this commit:

   Commit
   Minor fix in XmlParser::readBuffer to use a const xmlError * instance
   instead of non-const
    develop
    v1.1.0 v1.1.0-beta1
   @rkhaotix
   rkhaotix committed on Nov 21, 2023

Gentoo seems to be shipping pgmodeler-0.9.4 as it's latest version.
This issue is already resolved upstream in the advertised production version 1.1.0.

I've attached an ebuild for 1.1.0.

Here's a diff:
build pgmodeler-1.1.0.ebuild 
6c6
< POSTGRES_COMPAT=( 10 11 12 13 14 )
---
> POSTGRES_COMPAT=( 15 16)
23,27c23,24
< 	dev-qt/qtcore:5
< 	dev-qt/qtnetwork:5
< 	dev-qt/qtprintsupport:5
< 	dev-qt/qtsvg:5
< 	dev-qt/qtwidgets:5
---
> 	dev-qt/qtbase:6
> 	dev-qt/qtsvg:6
36c33
< 	eqmake5 \
---
> 	eqmake6 \
47c44
< 	eqmake5 tests.pro
---
> 	eqmake6 tests.pro
Comment 4 Louis Frayser 2024-03-06 01:36:56 UTC
I also want to CONFIRM this issue.
Comment 5 Eli Schwartz gentoo-dev 2024-11-26 03:08:01 UTC
(In reply to Louis Frayser from comment #3)
> Here's a diff:
> build pgmodeler-1.1.0.ebuild 
> 6c6
> < POSTGRES_COMPAT=( 10 11 12 13 14 )
> ---
> > POSTGRES_COMPAT=( 15 16)

Hmm, any particular reason to drop support for older versions? Did upstream drop support?

If upstream supports it and it's in tree it seems reasonable enough to leave it supported -- and there is at least one other package in tree which only lists COMPAT up to 14, which means it's probably convenient to allow both to be installed at the same time with a single postgres slot.

> 23,27c23,24
> < 	dev-qt/qtcore:5
> < 	dev-qt/qtnetwork:5
> < 	dev-qt/qtprintsupport:5
> < 	dev-qt/qtsvg:5
> < 	dev-qt/qtwidgets:5
> ---
> > 	dev-qt/qtbase:6
> > 	dev-qt/qtsvg:6


This seems wrong, as you should require specific USE flags from qtbase:6 due to it linking to various components such as network,widgets,gui


> 36c33
> < 	eqmake5 \
> ---
> > 	eqmake6 \
> 47c44
> < 	eqmake5 tests.pro
> ---
> > 	eqmake6 tests.pro
Comment 6 CaptainBlood 2024-11-26 11:57:39 UTC

(In reply to Louis Frayser from comment #3)
> Created attachment 886770 [details]
> pgmodeler-1.1.0.ebuild
> 
> I've patched pgmodeler-x.x.x/libs/libparsers/src/xmlparser.cpp
> for 1.0.5, 1.0.6 in the past.  Today, I got curious and went to
> pgmodeler.io, then to github where I found this commit:
> 
>    Commit
>    Minor fix in XmlParser::readBuffer to use a const xmlError * instance
>    instead of non-const
>     develop
>     v1.1.0 v1.1.0-beta1
>    @rkhaotix
>    rkhaotix committed on Nov 21, 2023
> 
> Gentoo seems to be shipping pgmodeler-0.9.4 as it's latest version.
> This issue is already resolved upstream in the advertised production version
> 1.1.0.
> 
> I've attached an ebuild for 1.1.0.
> 
> Here's a diff:
> build pgmodeler-1.1.0.ebuild 
> 6c6
> < POSTGRES_COMPAT=( 10 11 12 13 14 )
> ---
> > POSTGRES_COMPAT=( 15 16)
> 23,27c23,24
> < 	dev-qt/qtcore:5
> < 	dev-qt/qtnetwork:5
> < 	dev-qt/qtprintsupport:5
> < 	dev-qt/qtsvg:5
> < 	dev-qt/qtwidgets:5
> ---
> > 	dev-qt/qtbase:6
> > 	dev-qt/qtsvg:6
> 36c33
> < 	eqmake5 \
> ---
> > 	eqmake6 \
> 47c44
> < 	eqmake5 tests.pro
> ---
> > 	eqmake6 tests.pro

#944962 should help (TESTED)
Comment 7 Louis Frayser 2024-11-27 23:16:22 UTC
(In reply to Eli Schwartz from comment #5)
> (In reply to Louis Frayser from comment #3)
> > Here's a diff:
> > build pgmodeler-1.1.0.ebuild 
> > 6c6
> > < POSTGRES_COMPAT=( 10 11 12 13 14 )
> > ---
> > > POSTGRES_COMPAT=( 15 16)
> 
> Hmm, any particular reason to drop support for older versions? Did upstream
> drop support?
> 
I didn't know how POSTGRES_TARGETS worked, so I removed the old databases to keep emerge from installing them. I should have used the USE variables instead.

> If upstream supports it and it's in tree it seems reasonable enough to leave
> it supported -- and there is at least one other package in tree which only
> lists COMPAT up to 14, which means it's probably convenient to allow both to
> be installed at the same time with a single postgres slot.
> 
Upstream seems to support all database versions, but portage only has ebuilds down to postgresql-12.

> > 23,27c23,24
> > < 	dev-qt/qtcore:5
> > < 	dev-qt/qtnetwork:5
> > < 	dev-qt/qtprintsupport:5
> > < 	dev-qt/qtsvg:5
> > < 	dev-qt/qtwidgets:5
> > ---
> > > 	dev-qt/qtbase:6
> > > 	dev-qt/qtsvg:6
> 
> 
> This seems wrong, as you should require specific USE flags from qtbase:6 due
> to it linking to various components such as network,widgets,gui
> 
Yes, I saw that in the 1.1.5 ebuild (in Issue #944962). I found it informative.

> 
> > 36c33
> > < 	eqmake5 \
> > ---
> > > 	eqmake6 \
> > 47c44
> > < 	eqmake5 tests.pro
> > ---
> > > 	eqmake6 tests.pro
Comment 8 Louis Frayser 2024-11-27 23:18:57 UTC
(In reply to CaptainBlood from comment #6)
> 
> (In reply to Louis Frayser from comment #3)
> > Created attachment 886770 [details]
> > pgmodeler-1.1.0.ebuild
.
.
.
> 
> #944962 should help (TESTED)

Thanks, I just emerged, tested it, and updated #944962 too.