Recent

Author Topic: missing libgcc_s_sjlj-1.dll at application startup  (Read 3174 times)

Luc

  • New Member
  • *
  • Posts: 35
missing libgcc_s_sjlj-1.dll at application startup
« on: May 20, 2015, 08:33:37 am »
    Hello,

    I'm currently working on two applications (a "client" app and a "server" one).
    Both run ok on the dev machine (win 8 parallel VM)
    Yesterday I tried to install them on another computer (a laptop running win 7).

    client App installs and runs ok
    server App installs but complains about missing libgcc_s_sjlj-1.dll and doesn't start.
    I solved it by adding the missing dll to the installer but I still don't understand why the App needs this dll...

    Both App are compiled to the default target (win32).

    So far, I have tried to :

    • Build in debug/release mode (I first thought it could be related to gdb)
    • scan the files (*.*) to find the dll name
    • scan the files (*.pas; *.inc) to find SafeLoadLibrary and catch the dll loader
    • force the build to win32 widgetset
    • add 'module' option (may be named dll or library in Lazarus English menu) in the event log but no use of this dll is shown
    • located the dll on dev machine and renamed it, then ran the "server" App... runs OK...

    I saw this could be related to QT but I don't use QT.
    I think it could also be related to the packages used (the two apps don't use exactly the same packages (lpk))
    So I'm a little bit lost

    Is there any way to list all dll dependencies for a FPC bin ?
    By the way, I have another question: Are all packages rebuilt with the correct build mode when App build mode is set to release (even if "generate debug info" is set in packages option) ?

    Any help is welcome !
    Many Thanks
    luc

Win 10 (Running in Parallel VM - Mac OSX) - Lazarus 2.0.4 - i386-win32/win64

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9235
  • FPC developer.
Re: missing libgcc_s_sjlj-1.dll at application startup
« Reply #1 on: May 20, 2015, 09:31:22 am »
Standard Lazarus applications doesn't have dependencies on non microsoft DLLs.

So it must be some package you use. Do you use e.g. DLLs for database? It might be it belongs to them, and then the easiest solution is to go where you got those and also get this one ( :_ ) )

Yes, using tools as PE EXPLORER (trial version available) you can view what DLLs a binary requires

Luc

  • New Member
  • *
  • Posts: 35
Re: missing libgcc_s_sjlj-1.dll at application startup
« Reply #2 on: May 20, 2015, 10:31:32 am »
Thanks marcov,

Quote
So it must be some package you use
I will build a test application adding the 3rd party lpk one by one to identify the dependency. But I still don't understand why "server" app is not asking dll dependency on dev machine...

Quote
DLLs for database?
For database, I use my own library linked to sqlite3.dll in both apps

Quote
PE EXPLORER
I will give a try (I already tried with API Monitor (from rohitab.com) but I couldn't attach the App because it doesn't start...)

Do you know the answer ?
Quote
Are all packages rebuilt with the correct build mode when App build mode is set to release (even if "generate debug info" is set in packages option) ?


Win 10 (Running in Parallel VM - Mac OSX) - Lazarus 2.0.4 - i386-win32/win64

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9235
  • FPC developer.
Re: missing libgcc_s_sjlj-1.dll at application startup
« Reply #3 on: May 20, 2015, 11:25:31 am »
Thanks marcov,

Quote
So it must be some package you use
I will build a test application adding the 3rd party lpk one by one to identify the dependency. But I still don't understand why "server" app is not asking dll dependency on dev machine...

The same dll (e.g. libmysql) may be built using differing compilers and differing other DLL dependencies. Maybe one of the DLLs used is a different build.

Even, it might not be the lazarus that requires the DLL, but another DLL used by Lazarus. In such case dependency walkers must be run to examine the DLLs not the EXE.

Luc

  • New Member
  • *
  • Posts: 35
Re: missing libgcc_s_sjlj-1.dll at application startup
« Reply #4 on: May 20, 2015, 01:08:52 pm »
You are absolutely right marcov,

I found the dependency. It comes from the FastReport package that uses zlib1.dll.

The laptop computer running win 7 has already the zlib1.dll but this one needs libgcc_s_sjlj-1.dll (I didn't use a dependency walker but the app works when I replaced this dll with the one on the dev machine).

So I will include the correct zlib1.dll in the installer... :)

Thanks for all.

PS if someone has an answer
Quote
Are all packages included in an application rebuilt with the correct build mode when App build mode is set to release (even if "generate debug info" is set in packages option) ?


Win 10 (Running in Parallel VM - Mac OSX) - Lazarus 2.0.4 - i386-win32/win64

 

TinyPortal © 2005-2018