handcraftedbits / docker-pgmodeler-builder

A Docker container that allows you to build pgModeler with one simple command
Apache License 2.0
47 stars 17 forks source link

pgmodeler v1.0.0 not work #3

Open rnrobles opened 1 year ago

rnrobles commented 1 year ago

apparently it stopped working from version 1.0.0, would it be possible to update the image?

handcraftedbits commented 1 year ago

Hi sorry, just saw this. Looks like this branch is working:

https://github.com/bqtran/docker-pgmodeler-builder

@bqtran, would you like to merge your change down? Looks like a Qt6 issue?

bqtran commented 1 year ago

Sorry, I've only updated the requirements (Qt6), and haven't had a chance to fully test it out yet. I'm pretty sure it should be working though.

Feel free to merge my changes if you like, @handcraftedbits 👍

rnrobles commented 1 year ago

I tried to use @bqtran's branch, but I had problems with the Dockerfile-cc image because of the python version, I solved it by adding:

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

but I don't know if it's the best option for it

thanks and regards

FireEmerald commented 1 year ago

I also tried @bqtran branch and even extended, fixed various small build issues but now i'm stuck at the make step of pgmodeler. The compiler does complain about a file:

make[1]: Entering directory '/opt/src/pgmodeler/libs/libcore'
rm -f libcore.so.1.0.0 libcore.so libcore.so.1 libcore.so.1.0
g++ -Wl,-rpath,'$ORIGIN' -Wl,-rpath,'$ORIGIN/../lib/pgmodeler' -Wl,-O1 -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu -shared -Wl,-soname,libcore.so.1 -o libcore.so.1.0.0 obj/textbox.o obj/basefunction.o obj/domain.o obj/actiontype.o obj/behaviortype.o obj/categorytype.o obj/constrainttype.o obj/deferraltype.o obj/encodingtype.o obj/eventtriggertype.o obj/eventtype.o obj/executiontype.o obj/firingtype.o obj/functiontype.o obj/identitytype.o obj/indexingtype.o obj/intervaltype.o obj/matchtype.o obj/paralleltype.o obj/partitioningtype.o obj/pgsqltype.o obj/policycmdtype.o obj/providertype.o obj/securitytype.o obj/spatialtype.o obj/storagetype.o obj/procedure.o obj/transform.o obj/trigger.o obj/basegraphicobject.o obj/baserelationship.o obj/type.o obj/column.o obj/tablespace.o obj/indexelement.o obj/index.o obj/operator.o obj/constraint.o obj/schema.o obj/language.o obj/role.o obj/sequence.o obj/usermapping.o obj/view.o obj/conversion.o obj/function.o obj/permission.o obj/databasemodel.o obj/rule.o obj/table.o obj/cast.o obj/aggregate.o obj/baseobject.o obj/relationship.o obj/basetable.o obj/operatorfamily.o obj/operatorclasselement.o obj/operatorclass.o obj/operationlist.o obj/tableobject.o obj/reference.o obj/collation.o obj/excludeelement.o obj/element.o obj/parameter.o obj/copyoptions.o obj/typeattribute.o obj/extension.o obj/tag.o obj/eventtrigger.o obj/operation.o obj/genericsql.o obj/policy.o obj/partitionkey.o obj/foreigndatawrapper.o obj/foreignobject.o obj/foreignserver.o obj/physicaltable.o obj/foreigntable.o obj/coreutilsns.o obj/moc_databasemodel.o obj/moc_basegraphicobject.o obj/moc_operationlist.o  -L/opt/src/pgmodeler/libs/libparsers -lparsers -L/opt/src/pgmodeler/libs/libutils -lutils /usr/lib/x86_64-linux-gnu/libQt6PrintSupport.so /usr/lib/x86_64-linux-gnu/libQt6Widgets.so /usr/lib/x86_64-linux-gnu/libQt6Svg.so /usr/lib/x86_64-linux-gnu/libQt6Gui.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so /usr/lib/x86_64-linux-gnu/libQt6Network.so /usr/lib/x86_64-linux-gnu/libQt6Core.so -lpthread -lGLX -lOpenGL -lXext -lX11 -lm
/opt/src/pgmodeler/libs/libparsers/libparsers.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:499: libcore.so.1.0.0] Error 1
make[1]: Leaving directory '/opt/src/pgmodeler/libs/libcore'

Where the complained file is:

file /opt/src/pgmodeler/libs/libparsers/libparsers.so.1.0.0
/opt/src/pgmodeler/libs/libparsers/libparsers.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=20dc56f7f96d13bbb98d0e0c0c126d4be942eedd, with debug_info, not stripped

I think it's an issue with 32/64bit files/build target - but don't know how to fix it...

You can use docker pull fireemerald/pgmodelbuilder-main to test the case from above. Start container and execute src/script/build.sh.

bqtran commented 1 year ago

Thanks for trying out my build, @FireEmerald . I'll try to iron more bugs out when I have some downtime this week.

bqtran commented 1 year ago

Please try my latest branch @FireEmerald and see if it works for you. I was able to get a successful build with my latest commit.

danielalexis commented 6 months ago

@bqtran your dockerfile, isn't currently working with the version 1.1.1

=> ERROR [sandbox deps1 1/1] RUN cd /opt/mxe &&   make MXE_TARGETS='x86_64-w64-mingw32.shared x86_64-w64-mingw32.static' zlib &&   make MXE_TARGETS='x86_64-w64-mingw32.shared' dbus openssl pcre2 f  1532.6s 
------
 > [sandbox deps1 1/1] RUN cd /opt/mxe &&   make MXE_TARGETS='x86_64-w64-mingw32.shared x86_64-w64-mingw32.static' zlib &&   make MXE_TARGETS='x86_64-w64-mingw32.shared' dbus openssl pcre2 fontconfig freetype harfbuzz jpeg zstd     sqlite mesa postgresql libxml2 &&   mkdir -p /opt/src &&   cd /opt/src &&   git clone https://github.com/digitalist/pydeployqt.git:
3.965 [download]    zlib-v1.3.1.tar.xz
4.561 [build]       zlib                    x86_64-w64-mingw32.shared
9.299 [done]        zlib                    x86_64-w64-mingw32.shared                            5364 KiB       0m4.726s
9.303 [build]       zlib                    x86_64-w64-mingw32.static
14.01 [done]        zlib                    x86_64-w64-mingw32.static                            5564 KiB       0m4.695s
17.17 [download]    expat-2.6.2.tar.bz2
19.28 [build]       expat                   x86_64-w64-mingw32.shared
35.01 [done]        expat                   x86_64-w64-mingw32.shared                            10324 KiB      0m15.716s
35.02 [download]    dbus-1.15.6.tar.xz
36.50 [build]       dbus                    x86_64-w64-mingw32.shared
105.9 [done]        dbus                    x86_64-w64-mingw32.shared                            22056 KiB      1m9.389s
105.9 [download]    openssl-3.3.0.tar.gz
116.2 [build]       openssl                 x86_64-w64-mingw32.shared
527.4 [done]        openssl                 x86_64-w64-mingw32.shared                            877992 KiB     6m51.166s
527.4 [download]    pcre2-10.43.tar.bz2
528.5 [build]       pcre2                   x86_64-w64-mingw32.shared
554.8 [done]        pcre2                   x86_64-w64-mingw32.shared                            17588 KiB      0m26.232s
554.8 [download]    brotli-v1.1.0.tar.gz
555.9 MXE Warning! Downloading brotli from second URL.
555.9 [download]    cmake-3.29.2.tar.gz
559.4 [build]       cmake                   x86_64-pc-linux-gnu
1057.7 [done]        cmake                   x86_64-pc-linux-gnu                                  518548 KiB     8m18.369s
1057.7 [build]       cmake-conf              x86_64-pc-linux-gnu
1061.6 [done]        cmake-conf              x86_64-pc-linux-gnu                                  12 KiB         0m3.869s
1061.6 [build]       cmake-conf              x86_64-w64-mingw32.shared
1064.7 [done]        cmake-conf              x86_64-w64-mingw32.shared                            12 KiB         0m3.102s
1064.8 [build]       brotli                  x86_64-w64-mingw32.shared
1086.2 [done]        brotli                  x86_64-w64-mingw32.shared                            7784 KiB       0m21.457s
1086.2 [download]    bzip2-1.0.8.tar.gz
1087.4 [build]       bzip2                   x86_64-w64-mingw32.shared
1092.2 [done]        bzip2                   x86_64-w64-mingw32.shared                            3668 KiB       0m4.785s
1092.2 [download]    libpng-1.6.43.tar.xz
1095.7 [build]       libpng                  x86_64-w64-mingw32.shared
1112.8 [done]        libpng                  x86_64-w64-mingw32.shared                            16920 KiB      0m17.157s
1112.9 [download]    freetype-2.13.2.tar.xz
1114.2 [build]       freetype-bootstrap      x86_64-w64-mingw32.shared
1130.8 [done]        freetype-bootstrap      x86_64-w64-mingw32.shared                            29772 KiB      0m16.568s
1130.8 [download]    libiconv-1.17.tar.gz
1132.1 [build]       libiconv                x86_64-w64-mingw32.shared
1153.2 [done]        libiconv                x86_64-w64-mingw32.shared                            27452 KiB      0m21.069s
1153.2 [build]       libiconv                x86_64-pc-linux-gnu
1175.0 [done]        libiconv                x86_64-pc-linux-gnu                                  31648 KiB      0m21.707s
1175.0 [download]    gettext-0.21.1.tar.lz
1176.5 [build]       gettext                 x86_64-pc-linux-gnu
1395.7 [done]        gettext                 x86_64-pc-linux-gnu                                  336980 KiB     3m39.087s
1395.7 [build]       gettext                 x86_64-w64-mingw32.shared
1429.2 [done]        gettext                 x86_64-w64-mingw32.shared                            141704 KiB     0m33.504s
1429.2 [download]    fontconfig-2.14.2.tar.xz
1431.6 [build]       autotools               x86_64-pc-linux-gnu
1436.2 [done]        autotools               x86_64-pc-linux-gnu                                  424 KiB        0m4.636s
1436.2 [build]       fontconfig              x86_64-w64-mingw32.shared
1466.2 [done]        fontconfig              x86_64-w64-mingw32.shared                            19564 KiB      0m29.964s
1466.2 [download]    ninja-v1.11.1.tar.gz
1467.1 [build]       ninja                   x86_64-pc-linux-gnu
1476.9 [done]        ninja                   x86_64-pc-linux-gnu                                  8372 KiB       0m9.776s
1476.9 [download]    meson-1.2.1.tar.gz
1477.9 [build]       meson                   x86_64-pc-linux-gnu
1482.5 [done]        meson                   x86_64-pc-linux-gnu                                  28120 KiB      0m4.636s
1482.5 [build]       meson-wrapper           x86_64-pc-linux-gnu
1485.5 [done]        meson-wrapper           x86_64-pc-linux-gnu                                  12 KiB         0m2.912s
1485.5 [build]       meson-wrapper           x86_64-w64-mingw32.shared
1489.7 [done]        meson-wrapper           x86_64-w64-mingw32.shared                            12 KiB         0m4.208s
1489.7 [download]    libffi-3.4.3.tar.gz
1490.2 [build]       libffi                  x86_64-w64-mingw32.shared
1501.2 [done]        libffi                  x86_64-w64-mingw32.shared                            8220 KiB       0m11.009s
1501.2 [meta]        cc                      x86_64-pc-linux-gnu
1501.2 [build]       libffi                  x86_64-pc-linux-gnu
1511.0 [done]        libffi                  x86_64-pc-linux-gnu                                  8272 KiB       0m9.756s
1511.0 [build]       zlib                    x86_64-pc-linux-gnu
1514.8 [done]        zlib                    x86_64-pc-linux-gnu                                  5316 KiB       0m3.776s
1514.8 [download]    glib-2.80.0.tar.xz
1516.6 [build]       glib                    x86_64-pc-linux-gnu
1530.5
1530.5 Failed to build package glib for target x86_64-pc-linux-gnu!
1530.5 ------------------------------------------------------------
1530.5 tmp-glib-x86_64-pc-linux-gnu/glib-2.80.0/meson.build:2422:26: ERROR: python is missing modules: packaging
1530.5 A full log can be found at /opt/mxe/tmp-glib-x86_64-pc-linux-gnu/glib-2.80.0.build_/meson-logs/meson-log.txt
1530.5 WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
1530.5 make[1]: *** [Makefile:903: build-only-glib_x86_64-pc-linux-gnu] Error 1
1530.5 make[1]: Leaving directory '/opt/mxe'
1530.5 real     0m13.878s
1530.5 user     0m10.133s
1530.5 sys      0m2.794s
1530.5 ------------------------------------------------------------
1530.5 [log]      /opt/mxe/log/glib_x86_64-pc-linux-gnu
1530.5
1530.5 make: *** [Makefile:891: /opt/mxe/usr/x86_64-pc-linux-gnu/installed/glib] Error 1
------
failed to solve: process "/bin/sh -c cd /opt/mxe &&   make MXE_TARGETS='x86_64-w64-mingw32.shared x86_64-w64-mingw32.static' zlib &&   make MXE_TARGETS='x86_64-w64-mingw32.shared' dbus openssl pcre2 fontconfig freetype harfbuzz jpeg zstd     sqlite mesa postgresql libxml2 &&   mkdir -p /opt/src &&   cd /opt/src &&   git clone https://github.com/digitalist/pydeployqt.git" did not complete successfully: exit code: 2
bqtran commented 6 months ago

Thanks for letting me know @danielalexis ! I've been meaning to update the build scripts to cut down on compile time as well... it's pretty excruciating atm.

I'll try to take a look at this sometime this week or next week.

bqtran commented 6 months ago

@danielalexis dockerfile is working again. I made some minor updates and was able to build v1.1.2 over the weekend.

Bad news is I was unable to shorten the compile time because MXE hasn't updated their binaries still, so the script needs to make the entire toolchain in order to compile the qt6 dependency that pgmodeler requires.

I think it's a minor inconvenience though, considering you do ultimately get the binaries in the end (albeit slowly).

Please test it out, and let me know if you have any issues.