Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building on fedora 36 #1

Closed
albfan opened this issue Aug 4, 2022 · 2 comments
Closed

Error building on fedora 36 #1

albfan opened this issue Aug 4, 2022 · 2 comments

Comments

@albfan
Copy link

albfan commented Aug 4, 2022

$ lazbuild --bm=Release pdotools.lpi
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
Hint: (lazarus) Missing state file of MultiThreadProcsLaz 1.2.1: /usr/lib64/lazarus/components/multithreadprocs/lib/x86_64-linux/MultiThreadProcsLaz.compiled
Error: (lazarus) unable to create package output directory "/usr/lib64/lazarus/components/multithreadprocs/lib/x86_64-linux" of package "MultiThreadProcsLaz 1.2.1"
Hint: (lazarus) normal output directory of package MultiThreadProcsLaz 1.2.1 is not writable: "/usr/lib64/lazarus/components/multithreadprocs/lib/x86_64-linux/"
TParsedCompilerOptions.SetOutputDirectoryOverride New=/home/alberto/.lazarus/lib/MultiThreadProcsLaz/lib/x86_64-linux
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.2.2 [2022/03/16] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling pdotools.lpr
(9022) Compiling resource /home/alberto/projects/pascal/pdo-tools/lib/x86_64-linux/pdotools.or
(9015) Linking /home/alberto/projects/pascal/pdo-tools/pdotools
/home/alberto/projects/pascal/pdo-tools/pdotools.lpr(20,1) Warning: (9034) "crtbeginS.o" not found, this will probably cause a linking failure
/home/alberto/projects/pascal/pdo-tools/pdotools.lpr(20,1) Warning: (9034) "crtendS.o" not found, this will probably cause a linking failure
/usr/bin/ld: no se puede encontrar -lhpdf
/home/alberto/projects/pascal/pdo-tools/pdotools.lpr(20,1) Error: (9013) Error while linking
/home/alberto/projects/pascal/pdo-tools/pdotools.lpr(20,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compilar proyecto, Modo: Release, Objetivo: pdotools: stopped with exit code 1
Error: (lazbuild) failed compiling of project /home/alberto/projects/pascal/pdo-tools/pdotools.lpi
[alberto@fedora pdo-tools]$ sudo dnf install build-essentials
Última comprobación de caducidad de metadatos hecha hace 0:01:48, el jue 04 ago 2022 12:58:57.
No hay coincidencias para el argumento: build-essentials
Error: No se pudo encontrar ningún resultado: build-essentials

This files are found here:

$ fd crtbegin /usr
/usr/lib64/clang/14.0.0/lib/clang_rt.crtbegin-x86_64.o
/usr/lib/gcc/x86_64-redhat-linux/12/crtbeginT.o
/usr/lib/gcc/x86_64-redhat-linux/12/crtbeginS.o
/usr/lib/gcc/x86_64-redhat-linux/12/crtbegin.o
/usr/lib/gcc/x86_64-redhat-linux/12/32/crtbeginT.o
/usr/lib/gcc/x86_64-redhat-linux/12/32/crtbegin.o
/usr/lib/gcc/x86_64-redhat-linux/12/32/crtbeginS.o
@dpethes
Copy link
Owner

dpethes commented Aug 4, 2022

Inability to build MultiThreadProcsLaz seems like an installation problem. Can you try building the project from Lazarus IDE? The crt issue can be fixed by changing the project settings, see https://forum.lazarus.freepascal.org/index.php?topic=34288.0 , but if MultiThreadProcsLaz won't build then it won't work.

/usr/bin/ld: no se puede encontrar -lhpdf

I guess you need libhpdf/libharu installed in your package manager - https://packages.fedoraproject.org/pkgs/libharu/libharu/

Anyway, I'll probably spin up a Fedora installation and take a look. Thanks for report.

@albfan
Copy link
Author

albfan commented Aug 4, 2022

didn't notice libharu.

sudo dnf install libharu-devel

fixed it.

About the crt*

I edited on /etc/fpc.cfg

# path to the gcclib


# searchpath for libraries
#IFDEF CPU64
#-Fl/usr/lib64/fpc/$fpcversion/lib
#-Fl/lib64;/usr/lib64
-Fl/usr/lib64/fpc/$fpcversion/lib/$FPCTARGET;/usr/lib/gcc/x86_64-redhat-linux/12
#ELSE
#-Fl/usr/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl/usr/lib/fpc/$fpcversion/lib/$FPCTARGET;/usr/lib/gcc/x86_64-redhat-linux/12/32
#ENDIF

adding this paths usr/lib/gcc/x86_64-redhat-linux/12 and usr/lib/gcc/x86_64-redhat-linux/12/32

and it is working!

@albfan albfan closed this as completed Aug 4, 2022
@albfan albfan mentioned this issue Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants