Sign in Join

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

Mailing lists / fpc-pascal / 2023-04

Building fpc trunk on Linux: Could not find unit directory for dependency package "rtl" required for package "a52"

4 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Ondrej Pokorny

Hello,

I am lost :/ I installed FPC 3.2.2 from the TAR file as described here: https://www.freepascal.org/docs-html/user/usersu5.html

I did "sudo ./install" and kept everything default.

Now, I want to build fpc main from Git. I do:

make clean all OPT='-O- -gw -godwarfsets -gl -Xg' DEBUG=1 INSTALL_PREFIX=$mypath FPMAKEOPT="-T $usethreads"
make install OPT='-O- -gw -godwarfsets -gl -Xg' DEBUG=1 INSTALL_PREFIX=$mypath FPMAKEOPT="-T $usethreads"

It takes a while and then I get this error:

make[1]: Entering directory '/home/pi/software/fpc/src' make -C packages smart
make[2]: Entering directory '/home/pi/software/fpc/src/packages' ./fpmake compile -T  --localunitdir=.. --os=linux --cpu=arm -o -gl -o -Ur -o -Xs -o -O2 -o -n -o -Fl/usr/lib/gcc/arm-linux-gnueabihf/8 -o -O- -o -gw -o -godwarfsets -o -gl -o -Xg -o -CVglobal-dynamic -o -darm -o -dDEBUG -o -dRELEASE
--compiler=/home/pi/software/fpc/src/compiler/ppcarm -bu -o -XX -o -CX The installer encountered the following error:
Could not find unit directory for dependency package "rtl" required for package "a52"
  $0014F0A0  ERROR,  line 6230 of src/fpmkunit.pp   $001575CC  CHECKEXTERNALPACKAGE,  line 7910 of src/fpmkunit.pp   $001578C4  COMPILEDEPENDENCIES,  line 7945 of src/fpmkunit.pp   $00159594  READYTOCOMPILE,  line 8280 of src/fpmkunit.pp   $001593C4  MAYBECOMPILE,  line 8253 of src/fpmkunit.pp   $0015C3E8  COMPILE,  line 8907 of src/fpmkunit.pp   $0014DAF0  COMPILE,  line 5945 of src/fpmkunit.pp   $0014E0A0  RUN,  line 6040 of src/fpmkunit.pp   $0006CBB0  main,  line 57 of fpmake.pp
make[2]: *** [Makefile:1965: smart] Error 1

OK, I searched for the error and found this page:
https://wiki.freepascal.org/FPMake#Could_not_find_unit_directory_for_dependency_package_.22rtl.22

It says: "In general the fpmake system scans the places typically used for fpc installations."

OK, I kept everything by default but it still doesn't find FPC directory... So OK, I want to set it, but what directory is it? I thought that the install script gives me the directory, but I don't find it there. When I run the install script again, I get:

Running on linux
Write permission in /etc.
Writing sample configuration file to /etc/fpc.cfg
Saved old "fpc.cfg" to "fpc.bak"
Writing sample configuration file to /usr/lib/fpc/3.2.2/ide/text/fp.cfg Saved old "fp.cfg" to "fp.bak"
Writing sample configuration file to /usr/lib/fpc/3.2.2/ide/text/fp.ini Saved old "fp.ini" to "fp.bak"
Writing sample configuration file to /etc/fppkg.cfg Saved old "fppkg.cfg" to "fppkg.bak"
Writing sample configuration file to /etc/fppkg/default Saved old "default" to "default.bak"

End of installation.

Do you know what I am missing to build FPC main from Git? Btw. I can build pas2js with a simple "make" just fine... I am lost :(

Thanks
Ondrej

Reply by email

Ondrej Pokorny
to Ondrej Pokorny
Ondrej Pokorny wrote

Even if I do
export FPCDIR=/usr/lib/fpc/3.2.2
before make (where the installer installed FPC), I get the same error: Could not find unit directory for dependency package "rtl" required for package "a52"

I have no idea, does anybody know what I am missing? I would appreciate any help.

Ondrej

P.S.: My whole script looks like:

# directory where FPC should be built into
mypath="~/software/fpc/exp"

# install directory of FPC 3.2.2
export FPCDIR=/usr/lib/fpc/3.2.2

# number of threads
set usethreads=4

cd src
# now I am in the fpc src directory from Git main
make clean all OPT='-O- -gw -godwarfsets -gl -Xg' DEBUG=1 INSTALL_PREFIX=$mypath FPMAKEOPT="-T $usethreads"
make install OPT='-O- -gw -godwarfsets -gl -Xg' DEBUG=1 INSTALL_PREFIX=$mypath FPMAKEOPT="-T $usethreads"
cd ..

Reply by email

Ondrej Pokorny
to Ondrej Pokorny
Ondrej Pokorny wrote
On 27.04.2023 15:54, Ondrej Pokorny via fpc-pascal wrote: > OK, I searched for the error and found this page: > https://wiki.freepascal.org/FPMake#Could_not_find_unit_directory_for_dependency_package_.22rtl.22

OK, I made the fpmake command work:

I added "--globalunitdir=.." to the fpmake line:

./fpmake compile -T  --localunitdir=.. --os=linux --cpu=arm -o -gl -o -Ur -o -Xs -o -O2 -o -n -o -Fl/usr/lib/gcc/arm-linux-gnueabihf/8 -o -O- -o -gw -o -godwarfsets -o -gl -o -Xg -o -CVglobal-dynamic -o -darm -o -dDEBUG -o -dRELEASE
--compiler=/home/pi/software/fpc/src/compiler/ppcarm -bu -o -XX -o -CX --globalunitdir=..

Now, the packages compile.

But the question still persists: why do you need it and what file do I have edit so that "make" works?

Btw. setting
  export FPCDIR=/home/pi/software/fpc/src
in my make script doesn't help (the ".." directs to /home/pi/software/fpc/src).

So I now know how to fix the fpmake command, but where do I have to fix it so that the make process works?

Ondrej

Reply by email