Problem running lazarus programs

Duncan Webb duncan-crosslfs at linuxowl.com
Sat Dec 10 00:26:54 PST 2005


Ken Moffat wrote:

> On Fri, 9 Dec 2005, Duncan Webb wrote:
>
>> Just wish to bump this question, I think that the problem is 
>> something to do with the build of binutils as this gave more errors 
>> that it should have done during the test phase. (maybe Ken can 
>> remember).
>>
>  For Pure64, 7 errors in ld are a fact of life.  Somebody last month 
> suggested the testsuite is trying to use lib64 (and obviously 
> failing). At the moment I'm still establishing datapoints for test 
> results from a current toolchain, then I'll put summaries in my home 
> directory and see if I can fix any of the failures.
>
>>
>> In case anybody wants to know lazarus is a Delphi like front end to 
>> the freepascal compiler.
>>
>  /me shudders :-)  The errors sound like binary software.  Well, I 
> downloaded fpc and lazarus - lazarus has some documentation, but fpc 
> appears to have none,  and it all appears to be in pascal (so, you 
> would need a pascal compiler to bootstrap it).  I guess that somewhere 
> it makes an old-fashioned assumption that threading will use 
> linuxthreads. I think that fedora provides this for compatability with 
> binaries, so probably nobody else would notice.

Didn't expect you to try to build lazarus because it's a bit of work.

Your spot on, it does need bootstrapping and it was a bit of a bitch to 
build. Three things to download, lazarus + fpc binary and source.
1) Created the directory fpc-2.0.0.x86_64
2) cd fpc-2.0.0.x86_64
3) Untarred the binary which fpc-2.0.0.x86_64-linux.tar in that directory
4) Untarred binary.x86_64-linux.tar
5) Untarred base.x86_64-linux.tar.gz (created bin, lib, man, share)
6) Untarred fpc-2.0.0.source.tar.gz (created fpc)
And that was just to unpack the source. ;-)

cd fpc
make -j1 compiler_cycle PP=/sources/fpc-2.0.0.x86_64/lib/fpc/2.0.0/ppcx64
for d in rtl packages fcl; do
        make -j1 -C $d clean 
PP=/sources/fpc-2.0.0.x86_64/fpc/compiler/ppcx64
done
make -j1 rtl packages_base_all fcl packages_extra_all 
PP=/sources/fpc-2.0.0.x86_64/fpc/compiler/ppcx64
make -j1 utils PP=/sources/fpc-2.0.0.x86_64/fpc/compiler/ppcx64 
DATA2INC=/sources/fpc-2.0.0.x86_64/fpc/utils/data2inc
make compiler_install rtl_install fcl_install \
    packages_install utils_install man_install \
    PP=/sources/fpc-2.0.0.x86_64/fpc/compiler/ppcx64 
FPCMAKE="/sources/fpc-2.0.0.x86_64/fpc/utils/fpcm/fpcmake" \
    INSTALL_PREFIX="/usr" INSTALL_MANDIR="/usr/share/man" \
    doc_install INSTALL_DOCDIR="/usr/share/doc/fpc-2.0.0/"

Building lazarus was pretty easy. make all. I guess that the fpc 
compiler is working but possible incorrectly as lazarus compiled okay.

>
>  The ldd errors suggest it might be built for multilib (always 
> remember that pure64 is a recent idea, and with the exception of 
> debian, no distros use it).

The base system is a gentoo system and they have a multilib build, so 
you could be correct it may only work with a multilib build.

>
>
>  Possibly, gdb might help you (I say might, because I haven't got 
> anything useful out of it for grub, so I hesitate to say it will 
> always help).  Equally, strace might be informative.

Tried strace and the output was just about as useless.
execve("/usr/share/lazarus/startlazarus", 
["/usr/share/lazarus/startlazarus"], [/* 26 vars */]) = -1 ENOENT (No 
such file or directory)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x2aaaaaac5000
lseek(3, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: No such file or di"..., 40) = 40
close(3)                                = 0
munmap(0x2aaaaaac5000, 4096)            = 0
exit_group(1)                           = ?

> Ken

The whole purpose of this was to use a program called ttsubgrab which 
reads a mpeg file with embedded teletext (recorded from a TV card) and 
generates a subrip (.srt) subtitle file so mplayer will show the subtitles.

Regards,
Duncan




More information about the cross-lfs mailing list