The International Simutrans Forum

 

Author Topic: cannot find -lbrotlidec  (Read 486 times)

0 Members and 1 Guest are viewing this topic.

Offline Flemmbrav

  • Devotee
  • *
  • Posts: 175
  • PAK-DEV P192C
  • Languages: DE, EN
cannot find -lbrotlidec
« on: June 09, 2020, 08:07:11 PM »
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.

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1464
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #1 on: June 10, 2020, 05:50:21 AM »
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.

Offline makie

  • Devotee
  • *
  • Posts: 203
    • Homepage PAK128-German
  • Languages: DE
Re: cannot find -lbrotlidec
« Reply #2 on: June 10, 2020, 09:53:01 AM »
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.

Offline Freahk

  • Devotee
  • *
  • Posts: 1172
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #3 on: June 10, 2020, 10:13:13 AM »
The screenshot looks like Windows using mingw ;)

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1464
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #4 on: June 10, 2020, 12:38:15 PM »
Yes, it's windows with mingw.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1348
Re: cannot find -lbrotlidec
« Reply #5 on: June 10, 2020, 03:44:20 PM »
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...)

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1464
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #6 on: June 10, 2020, 05:58:34 PM »
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.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1348
Re: cannot find -lbrotlidec
« Reply #7 on: June 10, 2020, 06:57:15 PM »
Can duplicate with an autoconf generated config.default.
Static linking appears broken again. Nuke "STATIC =1" in your config.default and it works.

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1464
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #8 on: June 10, 2020, 07:34:50 PM »
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?
« Last Edit: June 10, 2020, 07:45:47 PM by Leartin »

Offline Flemmbrav

  • Devotee
  • *
  • Posts: 175
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #9 on: June 10, 2020, 08:45:42 PM »
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.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1348
Re: cannot find -lbrotlidec
« Reply #10 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
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...

Offline Flemmbrav

  • Devotee
  • *
  • Posts: 175
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #11 on: June 10, 2020, 09:49:34 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?

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1464
  • PAK-DEV P192C
  • Languages: DE, EN
Re: cannot find -lbrotlidec
« Reply #12 on: June 11, 2020, 06:54:51 AM »
Yes, without freetype, it works even if it's static, at the loss of font support. That will do for now, thank you.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10032
  • Languages: De,EN,JP
Re: cannot find -lbrotlidec
« Reply #13 on: June 11, 2020, 11:30:48 AM »
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 ...