News:

Want to praise Simutrans?
Your feedback is important for us ;D.

cannot find -lbrotlidec

Started by Flemmbrav, June 09, 2020, 08:07:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Flemmbrav

Hello together,
I tried to compile Simutrans and get this error:

Luckily for me @Leartin has the same issue too, so I think it's not on me here.

Leartin

Using this tutorial: https://forum.simutrans.com/index.php/topic,16688.0.html

It worked before, but I updated both msys and Simutrans, so I can't be sure if Simutrans is at fault or if one of the dependencies (brotli?) changed to break.

makie

Linux or Windows?

The screenshot looks like Linux, but it seems to me that Simutrans starts in Wine and Wine is missing the runtime for Windows.


[de]Linux oder Windows?

Der Screenshot schaut nach Linux aus, aber mir scheint Simutrans startet in Wine und dem Wine fehlt die Runtime für Windows.

Mariculous

The screenshot looks like Windows using mingw ;)

Leartin

Yes, it's windows with mingw.

TurfIt

Simutrans has no direct 'brotli' dependancy. My older MSYS2 MinGW install has no reference to brotli at all.
I just upgraded, and a brotli package was automatically installed. Current Simutrans trunk compiles/links ok. (except SDL2 static build is broken...)

Leartin

Different PC - completely new installations of msys2, then added make, autoconf, mingw-w64-i686-gcc and mingw-w64-i686-freetype.
In the source folder first "autoconf && ./configure" and then "make".
Similar result - except both lines about something missing appear twice.

TurfIt

Can duplicate with an autoconf generated config.default.
Static linking appears broken again. Nuke "STATIC =1" in your config.default and it works.

Leartin

#8
Thank you, that worked  8)

With that, a sim.exe is created, but it spouts errors of missing dlls - libwinpthread, libgcc, libstdc, libbz2. Supposedly, that's because those are not "linked" now?

Flemmbrav

I removed the static=1 line from my config.
It does create a sim.exe now. That sim.exe does not run.
It tells me that it can't find libgcc_s_dw2-1.dll twice on first run. Windows stopped the sim.exe from running after
If i run it a second time or more, i get to see the errorcode 0x0000007b with the program aborting after.

I tried to load libz and libbz2 with pacman -S too. Got the same results still.

TurfIt

Yes, you'll have to pull all the required .dlls out of your /msys64/mingw32/bin/ directory and stick them with sim.exe
To find the required you can simply keep running sim.exe and note what it fails on.

___
I see it's freetype2 that's the culprit bringing in a dependency on brotli.  'freetype-config --libs --static' is asking for '-lbrotlidec -lbrotlicommon', but the brotli package has libbrotlidec-static.a and libbrotlicommon-static.a. Either the freetype-config is wrong, or the brotli package is wrong, don't think this is a Simutrans issue...

Flemmbrav

Quote from: TurfIt on June 10, 2020, 09:06:10 PM
Yes, you'll have to pull all the required .dlls out of your /msys64/mingw32/bin/ directory and stick them with sim.exe
Can that please be part of the readme? It just says that i need them, and doesn't tell me where to put them at all.
Where do i put them? just copy them in the same folder as the sim.exe?

Leartin

Yes, without freetype, it works even if it's static, at the loss of font support. That will do for now, thank you.

prissi

Sigh, mingw64 automatic including everything has it downsides. libminiupnpc is also broken since ages, because of a broken cmake there and Mingw insist on cmake instead of the nonßbroken Makefile. My bug report got the reply, must be fixed by libminiupnpc, which did not bother with cmake ...

Since libfreefont2 also include libharfbuzz (9 MB), which is not needed for Simutrans (since we have no kerning) but bigger than the whole SImutrans exe, I finally used my own libfreefont2 for the nightly builds and the release. I downloaded libfreetype, removed libharbuzz from mingw64, and the autoconf ... A much smaller libfreetype without too many dependencies and almost same functionality.

And brotli is not even a great compressor ...