Sign in Join

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

Mailing lists / fpc-devel / 2003-05

Linking problems with fpc cvs

11 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner

Hi,

I have a linking problem with the current fpc cvs (fixed branch) under linux.

For example doing a 'make linuxzip' results in the following linker error:

[...]
make -C net all
make[5]: Entering directory `/home/[...]/108/fpc/fcl/net' [...]
/home/[...]/108/fpc/compiler/ppc386 -XX -CX -Xs -OG2p3 -n -S2h -Fu/home/[...]/108/fpc/rtl/linux -Fu/home/[...]/108/fpc/packages/base/netdb -Fu/home/[...]/108/fpc/packages/base/libasync -FE../linux -di386 -dRELEASE mkxmlrpc.pp
/usr/bin/ld: cannot find libppaswrite.a
mkxmlrpc.pp(774) Error: Error while linking
make[5]: *** [mkxmlrpc] Error 1
make[5]: Leaving directory `/home/[...]/108/fpc/fcl/net' make[4]: *** [net_all] Error 2
[...]

The created fcl/linux/ppas.sh script:

#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; } DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; } echo Linking ../linux/mkxmlrpc
/usr/bin/ld -s -L. -o ../linux/mkxmlrpc ../linux/link.res if [ $? != 0 ]; then DoExitLink ../linux/mkxmlrpc; fi

The libppaswrite.a is in fcl/linux/, the same directory where ppash.sh is. The ppas.sh is executed with the same working directory as the compiler. Therefore the -L. can't find the library.

Any ideas?

Mattias

Reply by email

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 39 lines
Hi, I have a linking problem with the current fpc cvs (fixed branch) under linux. For example doing a 'make linuxzip' results in the following linker error: [...] make -C net all make[5]: Entering directory `/home/[...]/108/fpc/fcl/net' [...] /home/[...]/108/fpc/compiler/ppc386 -XX -CX -Xs -OG2p3 -n -S2h -Fu/home/[...]/108/fpc/rtl/linux -Fu/home/[...]/108/fpc/packages/base/netdb -Fu/home/[...]/108/fpc/packages/base/libasync -FE../linux -di386 -dRELEASE mkxmlrpc.pp /usr/bin/ld: cannot find libppaswrite.a mkxmlrpc.pp(774) Error: Error while linking make[5]: *** [mkxmlrpc] Error 1 make[5]: Leaving directory `/home/[...]/108/fpc/fcl/net' make[4]: *** [net_all] Error 2 [...] The created fcl/linux/ppas.sh script: #!/bin/sh DoExitAsm () { echo "An error occurred while assembling $1"; exit 1; } DoExitLink () { echo "An error occurred while linking $1"; exit 1; } echo Linking ../linux/mkxmlrpc /usr/bin/ld -s -L. -o ../linux/mkxmlrpc ../linux/link.res if [ $? != 0 ]; then DoExitLink ../linux/mkxmlrpc; fi The libppaswrite.a is in fcl/linux/, the same directory where ppash.sh is. The ppas.sh is executed with the same working directory as the compiler. Therefore the -L. can't find the library. Any ideas?

Yes, remove the -XX -CX -Xs options.
Then it should work fine (At least here it does).

Michael.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 47 lines
On Tue, 6 May 2003, Mattias Gaertner wrote: > Hi, > > I have a linking problem with the current fpc cvs (fixed branch) under > linux. > > For example doing a 'make linuxzip' results in the following linker > error: > > [...] > make -C net all > make[5]: Entering directory `/home/[...]/108/fpc/fcl/net' > [...] > /home/[...]/108/fpc/compiler/ppc386 -XX -CX -Xs -OG2p3 -n -S2h > -Fu/home/[...]/108/fpc/rtl/linux > -Fu/home/[...]/108/fpc/packages/base/netdb-Fu/home/[...]/108/fpc/packag > es/base/libasync -FE../linux -di386 -dRELEASE mkxmlrpc.pp > /usr/bin/ld: cannot find libppaswrite.a > mkxmlrpc.pp(774) Error: Error while linking > make[5]: *** [mkxmlrpc] Error 1 > make[5]: Leaving directory `/home/[...]/108/fpc/fcl/net' > make[4]: *** [net_all] Error 2 > [...] > > > The created fcl/linux/ppas.sh script: > > #!/bin/sh > DoExitAsm () > { echo "An error occurred while assembling $1"; exit 1; } > DoExitLink () > { echo "An error occurred while linking $1"; exit 1; } > echo Linking ../linux/mkxmlrpc > /usr/bin/ld -s -L. -o ../linux/mkxmlrpc ../linux/link.res > if [ $? != 0 ]; then DoExitLink ../linux/mkxmlrpc; fi > > The libppaswrite.a is in fcl/linux/, the same directory where ppash.sh > is. The ppas.sh is executed with the same working directory as the > compiler. Therefore the -L. can't find the library. > > Any ideas? Yes, remove the -XX -CX -Xs options. Then it should work fine (At least here it does).

Thx. I will try. Although I don't know where they were added. Maybe the docs know ...

Mattias

Reply by email

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 53 lines
On Tue, 6 May 2003 15:03:36 +0200 (CEST) wrote: > > > On Tue, 6 May 2003, Mattias Gaertner wrote: > > > Hi, > > > > I have a linking problem with the current fpc cvs (fixed branch) under > > linux. > > > > For example doing a 'make linuxzip' results in the following linker > > error: > > > > [...] > > make -C net all > > make[5]: Entering directory `/home/[...]/108/fpc/fcl/net' > > [...] > > /home/[...]/108/fpc/compiler/ppc386 -XX -CX -Xs -OG2p3 -n -S2h > > -Fu/home/[...]/108/fpc/rtl/linux > > -Fu/home/[...]/108/fpc/packages/base/netdb-Fu/home/[...]/108/fpc/packag > > es/base/libasync -FE../linux -di386 -dRELEASE mkxmlrpc.pp > > /usr/bin/ld: cannot find libppaswrite.a > > mkxmlrpc.pp(774) Error: Error while linking > > make[5]: *** [mkxmlrpc] Error 1 > > make[5]: Leaving directory `/home/[...]/108/fpc/fcl/net' > > make[4]: *** [net_all] Error 2 > > [...] > > > > > > The created fcl/linux/ppas.sh script: > > > > #!/bin/sh > > DoExitAsm () > > { echo "An error occurred while assembling $1"; exit 1; } > > DoExitLink () > > { echo "An error occurred while linking $1"; exit 1; } > > echo Linking ../linux/mkxmlrpc > > /usr/bin/ld -s -L. -o ../linux/mkxmlrpc ../linux/link.res > > if [ $? != 0 ]; then DoExitLink ../linux/mkxmlrpc; fi > > > > The libppaswrite.a is in fcl/linux/, the same directory where ppash.sh > > is. The ppas.sh is executed with the same working directory as the > > compiler. Therefore the -L. can't find the library. > > > > Any ideas? > > Yes, remove the -XX -CX -Xs options. > Then it should work fine (At least here it does). Thx. I will try. Although I don't know where they were added. Maybe the docs know ...

Probably setting RELEASE=1 does this.

Michael.

Reply by email

Marco van de Voort
to Unknown author
Show quoted text 13 lines
On Tue, 6 May 2003, Mattias Gaertner wrote: > > > is. The ppas.sh is executed with the same working directory as the > > > compiler. Therefore the -L. can't find the library. > > > > > > Any ideas? > > > > Yes, remove the -XX -CX -Xs options. > > Then it should work fine (At least here it does). > > Thx. I will try. Although I don't know where they were added. > Maybe the docs know ... Probably setting RELEASE=1 does this.

I think this is simply a fault, the platform building doesn't seem to be included. RELEASE_1_0_8_PRE1 works fine.

I can't build FIXES_1_0_0 because of this either, on *BSD, however simply

OPT="-Fu/full/path/to/fpc/fcl/freebsd" solves it for me.

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 13 lines
> On Tue, 6 May 2003, Mattias Gaertner wrote: > > > > is. The ppas.sh is executed with the same working directory as the > > > > compiler. Therefore the -L. can't find the library. > > > > > > > > Any ideas? > > > > > > Yes, remove the -XX -CX -Xs options. > > > Then it should work fine (At least here it does). > > > > Thx. I will try. Although I don't know where they were added. > > Maybe the docs know ... > > Probably setting RELEASE=1 does this.

The spec file also compiles smart.

Show quoted text 6 lines
I think this is simply a fault, the platform building doesn't seem to be included. RELEASE_1_0_8_PRE1 works fine. I can't build FIXES_1_0_0 because of this either, on *BSD, however simply OPT="-Fu/full/path/to/fpc/fcl/freebsd" solves it for me.

I solved it, by adding -Fl../$(OS_TARGET) to the fcl/net/Makefile.fpc options.
Now I'm trying to compile a fpc rpm under RH9. First bug is the deprecated rpm call to build the package. This can easily be fixed in the Makefile.fpc with
rpm <options> || rpmbuild <options>

Then I'm getting the next error:

error: Installed (but unpackaged) file(s) found:
/usr/doc/fpc-1.0.8/examples/...

Somehow the examples went to /usr/doc instead of /usr/share/doc.

Mattias

Reply by email

Mattias Gaertner
to Mattias Gaertner
Show quoted text 41 lines
On Tue, 6 May 2003 16:15:56 +0200 (CEST) (Marco van de Voort) wrote: > > On Tue, 6 May 2003, Mattias Gaertner wrote: > > > > > is. The ppas.sh is executed with the same working directory as > > > > > the compiler. Therefore the -L. can't find the library. > > > > > > > > > > Any ideas? > > > > > > > > Yes, remove the -XX -CX -Xs options. > > > > Then it should work fine (At least here it does). > > > > > > Thx. I will try. Although I don't know where they were added. > > > Maybe the docs know ... > > > > Probably setting RELEASE=1 does this. The spec file also compiles smart. > I think this is simply a fault, the platform building doesn't seem to > be included. RELEASE_1_0_8_PRE1 works fine. > > I can't build FIXES_1_0_0 because of this either, on *BSD, however > simply > > OPT="-Fu/full/path/to/fpc/fcl/freebsd" solves it for me. I solved it, by adding -Fl../$(OS_TARGET) to the fcl/net/Makefile.fpc options. Now I'm trying to compile a fpc rpm under RH9. First bug is the deprecated rpm call to build the package. This can easily be fixed in the Makefile.fpc with rpm <options> || rpmbuild <options> Then I'm getting the next error: error: Installed (but unpackaged) file(s) found: /usr/doc/fpc-1.0.8/examples/... Somehow the examples went to /usr/doc instead of /usr/share/doc.

It seems that fpcmake creates a lot of code like the following:

ifdef BSDhier
DOCPREFIXDIR=share/doc
else
DOCPREFIXDIR=doc
endif

I will leave this to the fpc-team.

Also the yylexacc is put under /usr/lib/fpc/.

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner: On Tue, 6 May 2003 16:41:59 +0200 It seems that fpcmake creates a lot of code like the…
Show quoted text 37 lines
On Tue, 6 May 2003 16:41:59 +0200 Mattias Gaertner wrote: > > > > > > Probably setting RELEASE=1 does this. > > The spec file also compiles smart. > > > > I think this is simply a fault, the platform building doesn't seem to > > be included. RELEASE_1_0_8_PRE1 works fine. > > > > I can't build FIXES_1_0_0 because of this either, on *BSD, however > > simply > > > > OPT="-Fu/full/path/to/fpc/fcl/freebsd" solves it for me. > > I solved it, by adding -Fl../$(OS_TARGET) to the fcl/net/Makefile.fpc > options. > Now I'm trying to compile a fpc rpm under RH9. First bug is the deprecated > rpm call to build the package. This can easily be fixed in the > Makefile.fpc with > rpm <options> || rpmbuild <options> > > Then I'm getting the next error: > > error: Installed (but unpackaged) file(s) found: > /usr/doc/fpc-1.0.8/examples/... > > Somehow the examples went to /usr/doc instead of /usr/share/doc. It seems that fpcmake creates a lot of code like the following: ifdef BSDhier DOCPREFIXDIR=share/doc else DOCPREFIXDIR=doc endif

BSDHIER enforces a BSD filesystem hierarchy,
and share/doc is the typical BSD locationto put docs

BSDHIER however does more things;

- /usr/local is default $PREFIX
- sources will go to $PREFIX/share/src
- examples to $PREFIX/share/examples

IOW as a rule, all platform independant stuff will go to $PREFIX/share.

----
The problem is where do most linux distro's put these things nowadays? Maybe the "linux" locations are simply outdated, and should be updated.

I checked for slackware 8.1, and that puts docs in /usr/doc, but symlinks /usr/share/doc to /usr/doc.

Reply by email

Peter Vreman
to Yakov
Show quoted text 7 lines
problem making fpc 1.1 cvs-uped 11 May node.pas(521,24) Error: Incompatible types: got "TCGLoc" expected "TLoc" any suggestion?

There is TLoc anymore, i guess there is some old leftover cpubase.pas in your tree

Reply by email