[fpc-devel] fnmatch (linux), where is the external code/symbol located?

Marco van de Voort fpc at pascalprogramming.org
Tue Oct 17 09:32:16 CEST 2023


Op 16-10-2023 om 17:03 schreef robert rozee via fpc-devel:
> function fnmatch( ... ) ... external;
> function fnmatch( ... ) ... external 'libc';
>
> both yield a compiler that, while capable of compiling a working terminal application, can NOT compile a (gtk2) GUI application. so the symbol "fnmatch" is NOT resolving to a match in "libc.so.6" where one would normally expect to find fnmatch defined.
>
> many thanks for any help that can be offered...
>
See the discussion on the forum.

Summary:

- the compiler doesn't link anything with GTK2 or libc for that matter, 
so working compiler or not shouldn't depend on a symbol in GTK2 header.

- Since it has perfectly fine definition in libc, my guess that this is 
some old workaround of GTK2 for some defunct version (or multiple 
varying prototypes) of fnmatch, something might have been resolved a 
decade ago already.

- the symbol is never used in Lazarus to my best knowledge. Simply 
omitting the line from the GTK2 header should allow you to continue with 
your patch evaluation.

- without the patches you are reviewing it works all fine, suggesting a 
problem in those patches that somehow forces linking to the symbol 
without it being used.


More information about the fpc-devel mailing list