Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak build #11

Open
LeandroStanger opened this issue Aug 11, 2018 · 22 comments
Open

Flatpak build #11

LeandroStanger opened this issue Aug 11, 2018 · 22 comments

Comments

@LeandroStanger
Copy link

LeandroStanger commented Aug 11, 2018

Please, consider supporting Flatpak and publishing Laidout on Flathub.

@tomlechner
Copy link
Contributor

So then are you volunteering to help with that?

Sorry I'm a bit late looking into this, I've never built or used Flatpaks..
Skimming the flatpak docs, everything seems straightforward except file system access. It seems like that would require a fair amount of rework in Laidout to use what they are calling portals within their sandboxed environment. At first glance, the Flatpak docs don't provide easy links to how specifically to implement that in C++ (for instance), instead only outlining non-specific protocol descriptions of something or other.

So first impressions, it looks like a lot of work for not a lot of benefit. Laidout in an AppImage is almost ready and is far easier to create and maintain.

@eszlari
Copy link

eszlari commented Nov 20, 2020

Skimming the flatpak docs, everything seems straightforward except file system access. It seems like that would require a fair amount of rework in Laidout to use what they are calling portals within their sandboxed environment.

You don't need to use portals (without using Gtk or Qt, it would be a lot of effort to implement anyway). You can give your app the same file system permissions as a regular non-flatpak app.

@tomlechner
Copy link
Contributor

I'd be happy to help someone who wants to take on Flatpak building!

If old fashioned c style file access (fopen, fread, fwrite, etc) and whatever libgraphicsmagick is doing can still be used just by changing app file permissions, then hopefully it's just a matter of finagling build scripts. I imagine Laidout's AppImage build script (which works great) would be a good place to start.

@eszlari
Copy link

eszlari commented Nov 22, 2020

I would volunteer to write the build manifest, but somebody else would have to maintain the app on Flathub.

@LeandroStanger LeandroStanger changed the title Add support for Flatpak packages Flatpak build Nov 22, 2020
@tomlechner
Copy link
Contributor

Hmm, the Flathub docs seem to say maintaining apps there is mostly git repo updating, provided the app meets app guidelines, which doesn't sound so hard. If that's true, and assuming very permissive filesystem access doesn't violate app guidelines, I could probably maintain it there IF you or someone else figures out how to build successfully. If it turns out maintenance there is way more involved than it sounds, my support there might be inconsistent, as I must focus my personal efforts on Laidout's tools, and not build systems. I mean unless someone gives me lots of money for particular things. Happy to help others to improve build systems though!

Side question, do you know if flatpak/flathub has any special requirements about .so based plugins? Particularly, can apps dlopen random things from someone's hard drive? The AppImage build just forces everything into the build, and ignores whether something is technically a plugin internally (the easiest solution). Currently this is only about Gegl nodes in Laidout, but my intent is to expand plugin features for libs that have horrible dependency troubles on some distros. Lumping everything together is fine by me, just looking for more info to make sure my approach to plugins in Laidout isn't terrible.

@eszlari
Copy link

eszlari commented Nov 24, 2020

Couldn't get it to build:

g++ core/document.o core/objectiterator.o core/drawdata.o core/fieldplace.o core/guides.o core/importimage.o core/laidoutprefs.o core/page.o core/papersizes.o core/plaintext.o core/project.o core/spreadview.o core/stylemanager.o core/utils.o calculator/values.o calculator/calculator.o calculator/interpreter.o calculator/curvevalue.o calculator/shortcuttodef.o impositions/imposition.o impositions/impositioneditor.o impositions/singles.o impositions/impositions.o impositions/dodecahedron.o impositions/box.o impositions/netimposition.o impositions/simplenet.o impositions/signatures.o impositions/signatureinterface.o impositions/netdialog.o impositions/polyptychwindow.o impositions/singleseditor.o plugins/plugin.o api/reimpose.o api/openandnew.o api/importexport.o api/buildicons.o api/functions.o interfaces/actionarea.o interfaces/nupinterface.o interfaces/aligninterface.o interfaces/anchorinterface.o interfaces/pagerangeinterface.o interfaces/graphicalshell.o interfaces/objectindicator.o interfaces/paperinterface.o interfaces/cloneinterface.o interfaces/animationinterface.o interfaces/objecttree.o interfaces/pagemarkerinterface.o interfaces/objectfilterinterface.o interfaces/pathintersectionsinterface.o nodes/nodeinterface.o nodes/nodeeditor.o nodes/nodes-dataobjects.o nodes/nodes.o printing/print.o printing/psfilters.o printing/pscolorpatch.o printing/psgradient.o printing/psimage.o printing/psimagepatch.o printing/pspathsdata.o printing/pseps.o printing/epsutils.o printing/psout.o filetypes/filefilters.o filetypes/filters.o filetypes/exportdialog.o filetypes/htmlgallery.o filetypes/importdialog.o filetypes/image.o filetypes/image-gs.o filetypes/laidoutimport.o filetypes/pageatlas.o filetypes/pdf.o filetypes/podofoimposeplan.o filetypes/postscript.o filetypes/ppt.o filetypes/scribus.o filetypes/svg.o dataobjects/affinevalue.o dataobjects/pointsetvalue.o dataobjects/bboxvalue.o dataobjects/group.o dataobjects/objectcontainer.o dataobjects/objectfilter.o dataobjects/drawableobject.o dataobjects/datafactory.o dataobjects/groupinterface.o dataobjects/epsdata.o dataobjects/fontvalue.o dataobjects/helpertypes.o dataobjects/imagevalue.o dataobjects/limagepatch.o dataobjects/limagedata.o dataobjects/limageinterface.o dataobjects/lgradientdata.o dataobjects/lperspectiveinterface.o dataobjects/lpathsdata.o dataobjects/mysterydata.o dataobjects/lsomedataref.o dataobjects/lengraverfilldata.o dataobjects/lcaptiondata.o dataobjects/ltextonpath.o dataobjects/lvoronoidata.o dataobjects/printermarks.o ui/about.o ui/autosavewindow.o ui/buttonbox.o ui/commandwindow.o ui/findwindow.o ui/headwindow.o ui/helpwindow.o ui/metawindow.o ui/importimagesdialog.o ui/newdoc.o ui/palettes.o ui/papersizewindow.o ui/plaintextwindow.o ui/pluginwindow.o ui/settingswindow.o ui/spreadeditor.o ui/viewwindow.o ui/valuewindow.o ui/interfaces.o  laidout-more.o laidout.o   polyptych/src/nets.o polyptych/src/poly.o -L/run/build/laidout/laxkit/lax/interfaces -L/run/build/laidout/laxkit/lax -llaxinterfaces -llaxkit -lharfbuzz -lcairo -lfontconfig  -L/usr/local/lib -L/usr/X11R6/lib -rdynamic -lXi -lXext -lX11 -lm -lpng `imlib2-config --libs` `pkg-config --libs freetype2` `pkg-config --libs GraphicsMagick++` `cups-config --libs` -ldl -lXft -lXrandr  -lreadline -lcrypto  -o laidout
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: core/laidoutprefs.o: in function `Laidout::LaidoutPreferences::LaidoutPreferences()':
/run/build/laidout/src/core/laidoutprefs.cc:70: undefined reference to `Laxkit::PtrStack<char>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/src/core/laidoutprefs.cc:70: undefined reference to `Laxkit::PtrStack<char>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: core/laidoutprefs.o: in function `Laidout::LaidoutPreferences::LaidoutPreferences()':
/run/build/laidout/src/core/laidoutprefs.cc:70: undefined reference to `Laxkit::PtrStack<char>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/src/core/laidoutprefs.cc:70: undefined reference to `Laxkit::PtrStack<char>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: calculator/interpreter.o: in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: impositions/impositioneditor.o: in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: interfaces/objecttree.o: in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: nodes/nodeeditor.o:/run/build/laidout/laxkit/lax/../lax/attributes.h:58: more undefined references to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)' follow
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ui/interfaces.o: in function `Laidout::GetBuiltinInterfaces(Laxkit::RefPtrStack<LaxInterfaces::anInterface>*)':
/run/build/laidout/src/ui/interfaces.cc:94: undefined reference to `Laxkit::RefPtrStack<LaxInterfaces::anInterface>::RefPtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(linestyle.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(fillstyle.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(aninterface.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(imageinterface.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(patchinterface.o):/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: more undefined references to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)' follow
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(shapebrush.o): in function `LaxInterfaces::ShapeBrush::ShapeBrush()':
/run/build/laidout/laxkit/lax/interfaces/shapebrush.cc:33: undefined reference to `Laxkit::PtrStack<Laxkit::NumStack<flatvector> >::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(shapebrush.o): in function `LaxInterfaces::ShapeBrush::ShapeBrush()':
/run/build/laidout/laxkit/lax/interfaces/shapebrush.cc:33: undefined reference to `Laxkit::PtrStack<Laxkit::NumStack<flatvector> >::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(ellipseinterface.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(textonpathinterface.o): in function `LaxInterfaces::TextOnPath::ConvertToPaths(bool, Laxkit::RefPtrStack<LaxInterfaces::SomeData>*)':
/run/build/laidout/laxkit/lax/interfaces/textonpathinterface.cc:986: undefined reference to `Laxkit::RefPtrStack<LaxInterfaces::SomeData>::RefPtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/textonpathinterface.cc:992: undefined reference to `Laxkit::RefPtrStack<LaxInterfaces::PathsData>::RefPtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/textonpathinterface.cc:1183: undefined reference to `Laxkit::RefPtrStack<LaxInterfaces::SomeData>::RefPtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/liblaxinterfaces.a(perspectiveinterface.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/interfaces/../../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/liblaxkit.a(filedialog.o): in function `Laxkit::FileDialog::FileDialog(Laxkit::anXWindow*, char const*, char const*, unsigned long, int, int, int, int, int, unsigned long, char const*, unsigned long, char const*, char const*, char const*, char const*)':
/run/build/laidout/laxkit/lax/filedialog.cc:176: undefined reference to `Laxkit::PtrStack<char>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/liblaxkit.a(filedialog.o): in function `Laxkit::FileDialog::FileDialog(Laxkit::anXWindow*, char const*, char const*, unsigned long, int, int, int, int, int, unsigned long, char const*, unsigned long, char const*, char const*, char const*, char const*)':
/run/build/laidout/laxkit/lax/filedialog.cc:176: undefined reference to `Laxkit::PtrStack<char>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/liblaxkit.a(curveinfo.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/./../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /run/build/laidout/laxkit/lax/liblaxkit.a(stackframe.o): in function `LaxFiles::Attribute::Attribute()':
/run/build/laidout/laxkit/lax/./../lax/attributes.h:58: undefined reference to `Laxkit::PtrStack<LaxFiles::Attribute>::PtrStack(char)'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:195: laidout] Error 1
make[1]: Leaving directory '/run/build/laidout/src'
make: *** [Makefile:28: laidout] Error 2

@eszlari
Copy link

eszlari commented Nov 24, 2020

Side question, do you know if flatpak/flathub has any special requirements about .so based plugins? Particularly, can apps dlopen random things from someone's hard drive?

No, but flatpak has it's own extension system.

The AppImage build just forces everything into the build, and ignores whether something is technically a plugin internally (the easiest solution). [...] Lumping everything together is fine by me,

Bundling everything would the preferred solution for flatpak in this case too.

@tomlechner
Copy link
Contributor

tomlechner commented Nov 24, 2020

Hmm.. What version of g++ are you using? Seems like g++ is ignoring template instancing.

Can you try configuring laidout with:

./configure --extra-cppflags '-DLAX_LISTS_SOURCE_TOO'

If that doesn't work, try removing lines 114 and 112 in laxkit/lax/lists.h before compiling anything so these lines:

#ifdef LAX_LISTS_SOURCE_TOO
#include <lax/lists.cc>
#endif

become:

#include <lax/lists.cc>

Over time g++ seems to get more picky about when and where template code gets compiled and linked. I have a few template implementations in .h/.cc files, instead of having everything in header files.. Supposedly the compiler will ignore duplicate compilations of template instances, but for some reason if i do all header templates, resulting executables are about a megabyte larger, and compiling takes longer.

@eszlari
Copy link

eszlari commented Nov 25, 2020

What version of g++ are you using?

10.2.0

Adding -DLAX_LISTS_SOURCE_TOO helped, but I still get No rule to make target 'makedepend':

for NAME in src src/api src/calculator src/core src/dataobjects src/filetypes src/impositions src/interfaces src/nodes src/plugins src/plugins/geglnodes src/polyptych/src src/printing src/text src/ui ; do touch $NAME/makedepend; done
cd src && make
make[1]: Entering directory '/run/build/laidout/src'
cd /run/build/laidout/laxkit/lax && make
cd /run/build/laidout/laxkit/lax/interfaces && make
g++ -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -std=c++11 -I/app/include/GraphicsMagick  -Wall -g -gdwarf-2   -I/run/build/laidout/laxkit/lax/.. `pkg-config --cflags freetype2` -I/run/build/laidout/src  -c -o laidout-more.o laidout-more.cc
g++ -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -std=c++11 -I/app/include/GraphicsMagick  -Wall -g -gdwarf-2   -I/run/build/laidout/laxkit/lax/.. `pkg-config --cflags freetype2` -I/run/build/laidout/src  -c -o laidout.o laidout.cc
cd /run/build/laidout/src/polyptych/src && make forlaidoutgl
make[2]: Entering directory '/run/build/laidout/laxkit/lax/interfaces'
Makefile:94: makedepend: No such file or directory
make[2]: *** No rule to make target 'makedepend'.  Stop.
make[2]: Entering directory '/run/build/laidout/laxkit/lax'
make[2]: Leaving directory '/run/build/laidout/laxkit/lax/interfaces'
g++ -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -std=c++11 -I/app/include/GraphicsMagick  -I/app/include/GraphicsMagick  -g -gdwarf-2 -fPIC -I./.. -I/usr/X11R6/include -Wall `pkg-config --cflags freetype2`  -c -o refcounted.o refcounted.cc
make[1]: *** [Makefile:229: laxinterface] Error 2
make[1]: *** Waiting for unfinished jobs....
g++ -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -std=c++11 -I/app/include/GraphicsMagick  -I/app/include/GraphicsMagick  -g -gdwarf-2 -fPIC -I./.. -I/usr/X11R6/include -Wall `pkg-config --cflags freetype2`  -c -o anobject.o anobject.cc
g++ -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -std=c++11 -I/app/include/GraphicsMagick  -I/app/include/GraphicsMagick  -g -gdwarf-2 -fPIC -I./.. -I/usr/X11R6/include -Wall `pkg-config --cflags freetype2`  -c -o lark.o lark.cc

@tomlechner
Copy link
Contributor

It's expecting a file called makedepend, which should have been made during a make touchdepends call..

Before compiling anything, try:

cd laxkit
make touchdepends

@eszlari
Copy link

eszlari commented Nov 26, 2020

Running: pushd laxkit
/run/build/laidout/laxkit /run/build/laidout
Running: make touchdepends
Makefile:9: Makefile-toinclude: No such file or directory
make: *** No rule to make target 'Makefile-toinclude'.  Stop.
Error: module laidout: Child process exited with code 2

@tomlechner
Copy link
Contributor

tomlechner commented Nov 26, 2020

./configure has to run before any make commands. That Makefile-toinclude is created by configure. Normally, Laidout's configure will call laxkit/configure automatically if a laxkit/lax/configured.h is not found. However, you might need special options if the final destination is a sandboxed thing.

For instance, the AppImage build script is here: https://github.com/Laidout/laidout/blob/master/.travis.yml, and I guess Laxkit had to be configured manually with:

cd laxkit
./configure --disable-sqlite --relocatable

Since that script was written, I updated Laidout's configure so that you shouldn't have to manually mess with Laxkit or download a separate icons repo. Just make sure that laxkit/lax/configured.h does not exist before running Laidout's configure.

To sum up, the normal steps for compiling from git master for a public release to an executable that might be moved around (like AppImage or FlatPaks) are supposed to be something like:

./configure --prefix=`whateverYouNeed' --relocatable --laxkit=`pwd`/laxkit/lax
make hidegarbage
make
cd src/icons
make all-with-lax #EDIT: laidout uses its own icons plus some from laxkit, this target builds both
cd ../..
make install

For simplicity, you can add --nogl --disable-sqlite to configure if you don't want the (kinda buggy) opengl 3d shape unwrapper or FontMatrix tag reading with sqlite. Also you should not have to manually call make touchdepends. It's a bug if that's required.

@eszlari
Copy link

eszlari commented Nov 26, 2020

laidout_compile.txt

@tomlechner
Copy link
Contributor

It appears I had not fully implemented the auto-configuring of Laxkit from Laidout!
Hopefully fixed in master. Please pull both Laxkit and Laidout and try again.

@eszlari
Copy link

eszlari commented Nov 27, 2020

laidout_compile2.txt

@tomlechner
Copy link
Contributor

Ok, more fixes in master for both Laidout and Laxkit. Also cleared a lot of those warnings.

@eszlari
Copy link

eszlari commented Nov 27, 2020

I opened a PR with the flatpak build files, because I guess this will get solved faster, if you can build it yourself locally.

@tomlechner
Copy link
Contributor

It would only be faster if one assumes I can already do flatpak builds on my kind of old machine! Until I have time and resources enough to upgrade my system, I don't really want to install a gig of flatpak related build environment.

Does it still fail on your machine?

@eszlari
Copy link

eszlari commented Nov 29, 2020

Does it still fail on your machine?

Yes.

@tomlechner
Copy link
Contributor

Would you have time to upload another build failure log? Debugging misery loves company! It seems like this is close to being resolved, my current build system is usually easy to hack with enough information about failures.

At any rate, ideally we'd have a github workflow that can automatically build flatpaks. The appimage script runs via TravisCI, and was made before github workflows were really functional.

@eszlari
Copy link

eszlari commented Jan 22, 2021

At any rate, ideally we'd have a github workflow that can automatically build flatpaks. The appimage script runs via TravisCI, and was made before github workflows were really functional.

You might take inspiration from this PR: obsproject/obs-studio#3804

@tomlechner
Copy link
Contributor

Interesting. Though someone still has to do the work! I'll probably have more time for build workflows myself when I'm closer to the next "Stable" release, hopefully "soon". In the meantime, I'm happy to address error logs people can post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants