Problem compiling a WebLaz project under Lazarus

旧巷老猫 提交于 2019-12-04 18:26:29

Probably you need to select the version you want, and then rebuild the relevant lazarus parts, so that the pkgs get build with the then selected apache.

Afaik the selection of the httpd daemons is simply changing order, it doesn't mean that all versions are supported at once, like e.g. mysqlconnection does.

From what I could investigate from the, very verbose, output using the Test button on the "Compiler Options" none for these option are defined:

  • FPCAPACHE_1_3
  • FPCAPACHE_2_0

So this means that in: /etc/fpc.cfg

#IFDEF FPCAPACHE_1_3
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd20/
#ELSE
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd22/
#ENDIF
#ENDIF

The test will revert to httpd22 by default.

None the less, having:

  1. /usr/lib/fpc/2.4.0/units/x86_64-linux/httpd20
  2. /usr/lib/fpc/2.4.0/units/x86_64-linux/httpd22

in the compiler's path to compiled units it means that it will find httpd20 first.

This means it will try to load the 2.0 version and not the 2.2 version of the compiled units.

So the first solution is to delete/move the 1. folder from the system.

This will let you compile, but alas it will not link on a 64 bit system (I'm testing on a AMD64 system so I'm not going to presume it works elsewhere).

The process ends with a hint, to add -fPIC to the compiler options.

If you go to Project->Compiler Options...->Other on the lower TextBox you can add it.

Voila, it's working.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!