FreeBSD failure compiling fpdoc 2.7.1

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

FreeBSD failure compiling fpdoc 2.7.1

Graeme Geldenhuys-2
Hi,

Below is the script I use to compile FPC 2.7.1. I am using FPC 2.6.0
(I noticed it is still allowed for a while, even though 2.6.2 is out).


--------------[ go.sh ]--------------------
#!/usr/local/bin/bash

TARGET=x86_64-freebsd
COMPILER=/data/devel/fpc-2.6.0/$TARGET/bin/ppcx64

gmake clean
gmake all -j 5 FPMAKEOPT="-T 8" FPC=$COMPILER
gmake install INSTALL_PREFIX=/data/devel/fpc-2.7.1/$TARGET/ FPC=$COMPILER
------------------[ end ]---------------------


The compiling of fpdoc fails with a linking error. Unable to find
libiconv, but what exactly is it looking for? If you look further down
my email, the libiconv *is* installed on my FreeBSD system, in the
usual location of /usr/local/lib/

So what am I missing, to resolve this compilation issue?


-------------------------------------------
...snip...
gmake[3]: Entering directory `/data/devel/fpc-2.7.1/src/utils/fpdoc'
../bin2obj -o css.inc -c DefaultCSS fpdoc.css
../bin2obj -o plusimage.inc -c PlusImageData images/plus.png
../bin2obj -o minusimage.inc -c MinusImageData images/minus.png
/data/devel/fpc-2.7.1/src/compiler/ppcx64 -Ur -Xs -O2 -n -S2h
-Fu/data/devel/fpc-2.7.1/src/rtl/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/paszlib/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/fcl-process/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/hash/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/fpmkunit/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/fcl-res/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/fcl-base/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/fcl-xml/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/fcl-passrc/units/x86_64-freebsd
-Fu/data/devel/fpc-2.7.1/src/packages/chm/units/x86_64-freebsd -FE.
-FUunits/x86_64-freebsd -Cg -dx86_64 -dRELEASE fpdoc.pp
/usr/bin/ld: cannot find -liconv
fpdoc.pp(404,1) Error: Error while linking
fpdoc.pp(404,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
gmake[3]: *** [fpdoc] Error 1
gmake[3]: Leaving directory `/data/devel/fpc-2.7.1/src/utils/fpdoc'
gmake[2]: *** [fpdoc_all] Error 2
gmake[2]: Leaving directory `/data/devel/fpc-2.7.1/src/utils'
gmake[1]: *** [utils_all] Error 2
gmake[1]: Leaving directory `/data/devel/fpc-2.7.1/src'
gmake: *** [build-stamp.x86_64-freebsd] Error 2
[src (master)]$


[src (master)]$ ls -l /usr/local/lib/libiconv*
-rw-r--r--  1 root  wheel  1116648  5 Jan 18:36 /usr/local/lib/libiconv.a
-r--r--r--  1 root  wheel      918  5 Jan 18:36 /usr/local/lib/libiconv.la
lrwxr-xr-x  1 root  wheel       13  5 Jan 18:36
/usr/local/lib/libiconv.so -> libiconv.so.3
-r--r--r--  1 root  wheel  1084538  5 Jan 18:36 /usr/local/lib/libiconv.so.3

------------------[ end ]---------------------



--
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Marco van de Voort
In our previous episode, Graeme Geldenhuys said:
> Below is the script I use to compile FPC 2.7.1. I am using FPC 2.6.0
> (I noticed it is still allowed for a while, even though 2.6.2 is out).

This is normal, pass  -Fl/usr/local/lib in opt (for releases, makepack from
fpcbuild does this)

Also see http://www.stack.nl/~marcov/buildfaq/#toc-Subsection-1.6.4

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Graeme Geldenhuys-3
On 2013-03-04 18:20, Marco van de Voort wrote:
>
> This is normal, pass  -Fl/usr/local/lib in opt (for releases, makepack from
> fpcbuild does this)

Thanks, that worked. Now FPC 2.7.1 compiles without problems, and it
install fine [or so it appears].

Last night I wanted to test with FPC 2.7.1 again. So did the whole
"update from Trunk", rebuild and install. It all seems to have gone
well.... but I can't compile any of my projects with 2.7.1 (but I can
with 2.6.0).

In seems that the 'gmake install' doesn't install the *.a files that FPC
generates, so my apps fail to link. I did a comparison between my 2.7.1
and 2.6.0 (installed from official installer) directories. In 2.6.0 the
*.a files are found in the lib/fpc/2.6.0/... directories, but in 2.7.1
they are not (they only appear in the FPC 'src' directory tree).

Has the 'gmake install' changed in 2.7.1 compared to how it worked
before? Or is there again something special required for FreeBSD systems?

Here is my go.sh script I use to build and install FPC 2.7.1

----8<-------------8<-------------8<-------------8<-------------8<----
#!/usr/local/bin/bash

TARGET=x86_64-freebsd
COMPILER=/data/devel/fpc-2.6.0/$TARGET/bin/ppcx64

#gmake clean
gmake all -j 5 FPMAKEOPT="-T 8" FPC=$COMPILER
FPCOPT="-Fl/usr/local/lib/" OPT="-Fl/usr/local/lib/"
gmake install INSTALL_PREFIX=/data/devel/fpc-2.7.1/$TARGET/ FPC=$COMPILER

----8<-------------8<-------------8<-------------8<-------------8<----

Here is the compiler errors I get when trying to compile one of my apps
with 2.7.1

-------------------------------------
Free Pascal Compiler version 2.7.1 [2013/03/14] for x86_64
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: FreeBSD for x86-64
Compiling tiOPFUnitTestsFPGui.lpr
Compiling /data/devel/fpgui/src/corelib/fpg_base.pas
Compiling /data/devel/fpgui/src/corelib/x11/fpg_impl.pas
Compiling /data/devel/fpgui/src/corelib/fpg_main.pas
...snip...
Compiling /data/devel/tiopf/UnitTests/Tests/tiOPFAsqlite3_TST.pas
Compiling /data/devel/tiopf/UnitTests/Tests/tiOPFUIB_FB_TST.pas
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsyncobjs.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpcontnrs.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpx.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpprocess.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpxlib.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpxutil.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpgettext.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbugintf.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbugmsg.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsimpleipc.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libppipes.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinifiles.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpzbase.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpzdeflate.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpzinflate.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libptrees.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpadler.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinfblock.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinfutil.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinfcodes.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinftrees.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpinffast.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsqldb.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpibconnection.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdb.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpbufdataset.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpsqlscript.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpmaskutils.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbconst.a not found,
Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpbufdataset_parser.a
not found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbf_prscore.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbf_prsdef.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpdbf_prssupp.a not
found, Linking may fail !
tiOPFUnitTestsFPGui.lpr(33,1) Warning: Library libpibase60dyn.a not
found, Linking may fail !
Linking tiOPFUnitTestsFPGui
/usr/bin/ld: cannot find libpsyncobjs.a
tiOPFUnitTestsFPGui.lpr(33,1) Error: Error while linking
tiOPFUnitTestsFPGui.lpr(33,1) Fatal: There were 1 errors compiling
module, stopping
Fatal: Compilation aborted
Error: /data/devel/fpc-2.7.1/x86_64-freebsd/bin/ppcx64 returned an error
exitcode
Compilation complete

-------------------------------------


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: FreeBSD failure compiling fpdoc 2.7.1

Pierre Muller
> In seems that the 'gmake install' doesn't install the *.a files that FPC
> generates, so my apps fail to link. I did a comparison between my 2.7.1
> and 2.6.0 (installed from official installer) directories. In 2.6.0 the
> *.a files are found in the lib/fpc/2.6.0/... directories, but in 2.7.1
> they are not (they only appear in the FPC 'src' directory tree).
>
> Has the 'gmake install' changed in 2.7.1 compared to how it worked
> before? Or is there again something special required for FreeBSD systems?

  Did you check what happens when you call
gmake install ?

 One of the problems I often get is that
I have a release compiler in the path.
In that case the outcome of 'fpc-iSOSP..'
is used to generated the sub-directory into which
the generated libraries will be stored...

So often I end up with
  BASE_271_DIR/lib/fpc/2.7.1
but also
  BASE_271_DIR/lib/fpc/2.6.0
which contains the newly installed linraries...

 I don't exactly know when, and when not,
this problem shows up.
  A good solution to avoid it is to put
your trunk compiler binary in the path before the release
compiler.

Pierre

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Graeme Geldenhuys-3
On 2013-03-15 16:40, Pierre Free Pascal wrote:
>
> So often I end up with
>   BASE_271_DIR/lib/fpc/2.7.1
> but also
>   BASE_271_DIR/lib/fpc/2.6.0
> which contains the newly installed linraries...


No, that is not the case. I only have a lib/fpc/2.7.1/ directory tree.
My build script was posted in my earlier message. I have used that same
script since about FPC 2.4.0


>   A good solution to avoid it is to put
> your trunk compiler binary in the path before the release
> compiler.

I explicit specify the compiler and install prefix to avoid such issues.
This has worked for many years. It seems it might be a fpmake issue to
me. Everything is done correctly, except the lib*.a files are not copied
to the INSTALL_PREFIX path.


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Marco van de Voort
In reply to this post by Graeme Geldenhuys-3
In our previous episode, Graeme Geldenhuys said:
>
> #gmake clean
> gmake all -j 5 FPMAKEOPT="-T 8" FPC=$COMPILER
> FPCOPT="-Fl/usr/local/lib/" OPT="-Fl/usr/local/lib/"
> gmake install INSTALL_PREFIX=/data/devel/fpc-2.7.1/$TARGET/ FPC=$COMPILER

You install using the bootstrap compiler, not the generated one.

my script:

#!/usr/bin/env bash
# -dSHOWUSEDMEM  (this argument to the compiler)

ARCH=`uname -m`

echo ARCH is $ARCH

export ARGS="   -gl -viwn -Sg -Fl/usr/local/lib "

CPU_TARGET=i386
PP=ppcrel
NEWPP=ppc386
if [ $ARCH = "amd64" ] ; then
  CPU_TARGET=x86_64
  echo selecting 64 - bit
  PP=ppcrel_x64
  NEWPP=ppcx64
  ARGS+=" -gw2"
fi

echo $CPU_TARGET

if [ $ARCH = "i386" ] ; then
  ARGS+="-Cppentium3 -gl  "
fi

cd ~/src/fpc
gmake -j 2 clean CPU_TARGET="$CPU_TARGET" PP=$PP OPT="$ARGS"  >& ~/cleanlog
gmake -j 2 all CPU_TARGET="$CPU_TARGET" PP=$PP OPT="$ARGS" >&  ~/buildlog
if [ ! $? = 0 ] ; then
 echo Build failed, again
else
 gmake install OPT="$ARGS" "CPU_TARGET=$CPU_TARGET" INSTALL_PREFIX=~/src/builded PP=~/src/fpc/compiler/$NEWPP >& ~/installog
 if [ ! $? = 0 ] ; then
  echo INSTALL failed | tee ~/outcome
 else
  echo Everything _should_ be fine.| tee ~/outcome
 fi
fi


 
 
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Graeme Geldenhuys-3
On 2013-03-15 18:08, Marco van de Voort wrote:
>
> You install using the bootstrap compiler, not the generated one.

OK, I changed the 'gmake install' in my scrip to use the generated
compiler. It made no difference.



> my script:

I used your script (nice by the way), and it produced the exact same
results as mine. No lib*.a files in the INSTALL_PREFIX directory tree.

I'm using FreeBSD 9.1 64-bit

My starting compiler is FPC 2.6.2 (installed from binary release).


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Graeme Geldenhuys-3
In reply to this post by Graeme Geldenhuys-2
On 2013-03-15 21:22, Marco van de Voort wrote:
>
> Try adding RELEASE=1
>

It still fails. Do you Marco, or anybody else, know where the actual
code is in fpmake or Makefiles that says "copy all *.ppu, *,o and *.a
files to INSTALL_PREFIX"?

I don't really understand Makefile syntax that well (never used them in
any of my projects), and a quick search through the FPC files didn't
reveal anything obvious to me. But I would like to debug this problem on
my system, and get it to work. The released FPC versions are correct,
and contain the lib*.a files, but no matter what I try, those files are
not copied during my FPC 2.7.1 build & install process.


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD failure compiling fpdoc 2.7.1

Graeme Geldenhuys-3
In reply to this post by Graeme Geldenhuys-3
On 2013-03-15 10:46, Graeme Geldenhuys wrote:
>
> In seems that the 'gmake install' doesn't install the lib*.a files that FPC
> generates, so my apps fail to link.


Just as a test. I checked out the 'fixes_2_6' branch, and used my same
build script as I did before. It successfully built and installed FPC
2.6.3 _with_ the lib*.a files in the INSTALL_PREFIX directory tree.



Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal