Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-10

linker apache linux

9 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexey Voychehovich

Hello all

if i try compile free pascal http22 examples in ubuntu - i get this error.

sudo make /bin/mkdir -p units/i386-linux /usr/bin/ppc386 -Fu../../../rtl -Fu../../../packages/httpd22/units/i386-linux -FE. -FUunits/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.3.3 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 minimain.pas Free Pascal Compiler version 2.2.2-8 [2009/01/08] for i386 Copyright (c) 1993-2008 by Florian Klaempfl Target OS: Linux for i386 Compiling minimain.pas 66 lines compiled, 0.1 sec /usr/bin/ppc386 -Fu../../../rtl -Fu../../../packages/httpd22/units/i386-linux -FE. -FUunits/i386-linux -Fl/usr/lib/gcc/i486-linux-gnu/4.3.3 -Flinclude -Fl/etc/ld.so.conf.d/*.conf -di386 mod_example.pp Free Pascal Compiler version 2.2.2-8 [2009/01/08] for i386 Copyright (c) 1993-2008 by Florian Klaempfl Target OS: Linux for i386 Compiling mod_example.pp mod_example.pp(494,3) Note: Local variable "dcfg" is assigned but never used mod_example.pp(1009,3) Note: Local variable "cfg" is assigned but never used Linking ./libmod_example.so mod_example.pp(1342,1) Error: Can't call the linker, switching to external linking mod_example.pp(1342,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make: *** [mod_example] Error 1 -- help please. -- Don`t drink and drive, smoke and fly!
Jonas Maebe
to Alexey Voychehovich
Alexey Voychehovich wrote 15 lines
Compiling mod_example.pp mod_example.pp(494,3) Note: Local variable "dcfg" is assigned but never used mod_example.pp(1009,3) Note: Local variable "cfg" is assigned but never used Linking ./libmod_example.so mod_example.pp(1342,1) Error: Can't call the linker, switching to external linking mod_example.pp(1342,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make: *** [mod_example] Error 1 -- help please.

http://www.freepascal.org/faq.var#unix-ld219

Downgrade to binutils 2.18.x, or try upgrading binutils and hope that Ubuntu has backported the required fix already (no new release of binutils has been made since that bug was fixed).

Jonas

Alexey Voytsehovich
to Jonas Maebe

Hello Jonas,

you wrote 7 lines
> help please. http://www.freepascal.org/faq.var#unix-ld219 Downgrade to binutils 2.18.x, or try upgrading binutils and hope that Ubuntu has backported the required fix already (no new release of binutils has been made since that bug was fixed).

Thank you. But, do not prompt a beginner how to do this?

Best regards, Alexey Voytsehovich
Jonas Maebe
to Alexey Voytsehovich
Alexey Voytsehovich wrote 9 lines
Hello Jonas, Thursday, October 8, 2009, 10:49:43 AM, you wrote: > Downgrade to binutils 2.18.x, or try upgrading binutils and hope that > Ubuntu has backported the required fix already (no new release of > binutils has been made since that bug was fixed). Thank you. But, do not prompt a beginner how to do this?

I don't know.

Jonas

Alexey Voychehovich
to Jonas Maebe

i backported to
aptitude show binutils
Package: binutils
State: installed
Automatically installed: no
Version: 2.18.93.20081009-0ubuntu1
Priority: optional
Section: devel
Maintainer: Ubuntu Core developers
Uncompressed Size: 8729k
Depends: libc6 (>= 2.8~20080505), zlib1g (>= 1:1.1.4) Suggests: binutils-doc (= 2.18.93.20081009-0ubuntu1) Conflicts: elf-binutils, gas, modutils (< 2.4.19-1) Provides: elf-binutils
Description: The GNU assembler, linker and binary utilities The programs in this package are used to assemble, link and manipulate binary and object files. They may be used in conjunction with a compiler and various
libraries to build programs.

ld -v
GNU ld (GNU Binutils for Ubuntu) 2.18.93.20081009

but got this error
fpc mod_hello.pp
Free Pascal Compiler version 2.2.2-8 [2009/01/08] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for i386
Compiling mod_hello.pp
Linking libmod_hello.so
mod_hello.pp(229,1) Error: Can't call the linker, switching to external linking
mod_hello.pp(229,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)

help again please?

Jonas Maebe wrote 24 lines
On 08 Oct 2009, at 10:19, Alexey Voytsehovich wrote: Hello Jonas, > > Thursday, October 8, 2009, 10:49:43 AM, you wrote: > > Downgrade to binutils 2.18.x, or try upgrading binutils and hope that >> Ubuntu has backported the required fix already (no new release of >> binutils has been made since that bug was fixed). >> > > Thank you. But, do not prompt a beginner how to do this? > I don't know. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Don`t drink and drive, smoke and fly!
Jonas Maebe
to Alexey Voychehovich
Alexey Voychehovich wrote 18 lines
but got this error fpc mod_hello.pp Free Pascal Compiler version 2.2.2-8 [2009/01/08] for i386 Copyright (c) 1993-2008 by Florian Klaempfl Target OS: Linux for i386 Compiling mod_hello.pp Linking libmod_hello.so mod_hello.pp(229,1) Error: Can't call the linker, switching to external linking mod_hello.pp(229,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled) help again please?

Try ld 2.18.50

And also use FPC 2.2.4, not 2.2.2.

Jonas

Alexey Voytsehovich
to Jonas Maebe

Hello Jonas,

you wrote 5 lines
> help again please? Try ld 2.18.50 And also use FPC 2.2.4, not 2.2.2.

ok
on fpc 2.2.4 and binutil 2.9.91 sources cimpiled and linked but if i load module in apache (on ubuntu)
i get this error

can`t locate API module structure 'test_module' in file .. -- but this module worked in windows xp :( Show you what is necessary to pay attention? -- Best regards, Alexey Voytsehovich
ABorka
to Alexey Voytsehovich

This usually comes when you compiled your Apache module with the wrong version of httpdXX directory from fpc/packages/.
There are 3 included in fpc:

httpd13
httpd20
and
httpd22

Delete the two that are not your Apache version and recompile your module (or in Lazarus -> Project -> Compiler Options -> Other unit files enter the path to the right httpdXX directory from fpc/packages/).

Alexey Voytsehovich wrote 22 lines
Hello Jonas, Thursday, October 8, 2009, 1:54:20 PM, you wrote: >> help again please? > Try ld 2.18.50 > And also use FPC 2.2.4, not 2.2.2. ok on fpc 2.2.4 and binutil 2.9.91 sources cimpiled and linked but if i load module in apache (on ubuntu) i get this error -- can`t locate API module structure 'test_module' in file .. -- but this module worked in windows xp :( Show you what is necessary to pay attention?
Alexey Voytsehovich
to ABorka

Hello ABorka,

you wrote 10 lines
This usually comes when you compiled your Apache module with the wrong version of httpdXX directory from fpc/packages/. There are 3 included in fpc: httpd13 httpd20 and httpd22 Delete the two that are not your Apache version and recompile your

Thank you. And can we somehow specify the keys when compiling a directory to use? Thanks in advance.

Best regards, Alexey Voytsehovich