You're right. It worked if I add the LD_LIBRARY_PATH before.

I will try your diff. No ideas for new diff, sorry.

Thanks!

On Thu, Feb 11, 2021 at 05:23:41PM +0000, Stuart Henderson wrote:
> [moving from misc to ports@]
> 
> On 2021-02-10, Jose N Figueroa <j...@figueroa.blue> wrote:
> > Hello,
> >
> > I'm struggling to make working the pgmodeler 0.9.3 application on OpenBSD 
> > -current
> >
> > When I try to run pgmodeler I get the following errors:
> >
> > ~ > pgmodeler
> > ld.so: pgmodeler: can't load library 'libpgmodeler_ui.so.2.0'
> > Killed 
> > ~ > pgmodeler
> > ld.so: pgmodeler: can't load library 'libpgconnector.so.2.0'
> > Killed 
> > ~ > pgmodeler
> > ld.so: pgmodeler: can't load library 'libpgmodeler.so.2.0'
> > Killed 
> > ~ > pgmodeler
> > ld.so: pgmodeler: can't load library 'libpgmodeler.so.2.0'
> > Killed 
> 
> The library run path is broken in the produced executable;
> 
> $ objdump  -p /usr/local/bin/pgmodeler|grep RU       
>   RUNPATH     
> $ORIGIN:$ORIGIN/../lib/pgmodeler:/usr/X11R6/lib:/usr/local/lib/qt5:/usr/local/lib/qt5:/usr/local/lib/qt5
> 
> You can get it to run for now without rebuilding by running
> 
>    LD_LIBRARY_PATH=/usr/local/lib/pgmodeler pgmodeler
> 
> I guess this maybe due to some change in the recent Qt update.
> Here's an ugly diff to workaround, maybe somebody has an idea for a
> better fix:
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/pgmodeler/Makefile,v
> retrieving revision 1.12
> diff -u -p -r1.12 Makefile
> --- Makefile  2 Jan 2021 22:31:45 -0000       1.12
> +++ Makefile  11 Feb 2021 17:22:18 -0000
> @@ -3,6 +3,7 @@
>  COMMENT =    PostgreSQL Database Modeler
>  
>  VERSION =    0.9.3
> +REVISION =   0
>  
>  GH_ACCOUNT = pgmodeler
>  GH_PROJECT = pgmodeler
> Index: patches/patch-pgmodeler_pri
> ===================================================================
> RCS file: /cvs/ports/databases/pgmodeler/patches/patch-pgmodeler_pri,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-pgmodeler_pri
> --- patches/patch-pgmodeler_pri       2 Jan 2021 22:31:45 -0000       1.3
> +++ patches/patch-pgmodeler_pri       11 Feb 2021 17:22:18 -0000
> @@ -3,6 +3,15 @@ $OpenBSD: patch-pgmodeler_pri,v 1.3 2021
>  Index: pgmodeler.pri
>  --- pgmodeler.pri.orig
>  +++ pgmodeler.pri
> +@@ -81,7 +81,7 @@ linux {
> + 
> +   # Specifies where to find the libraries at runtime
> +   RELATIVE_PRIVATELIBDIR = $$relative_path($$PRIVATELIBDIR, $$BINDIR)
> +-  QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\' 
> -Wl,-rpath,\'\$$ORIGIN/$$RELATIVE_PRIVATELIBDIR\'"
> ++  QMAKE_LFLAGS += "-Wl,-rpath,$$PREFIX/lib\ -Wl,-rpath,$$PRIVATELIBDIR"
> + 
> +   # Forcing the display of some warnings
> +   CONFIG(debug, debug|release): QMAKE_CXXFLAGS += "-Wall -Wextra 
> -Wuninitialized"
>  @@ -155,6 +155,7 @@ unix:!macx {
>     PKGCONFIG = libpq libxml-2.0
>     PGSQL_LIB = -lpq
> 
> 

-- 
Jose Figueroa

Reply via email to