You are not logged in.
Hello,
What I'm acutally trying to do is to run hashcat on Arch (or rather crack a bcrypt file (john failed, so trying hashcat)). To do this I think I need an OpenCL implementation for my CPU (would prefer to not use the GPU due to nvidia issues), and I found the beignet AUR. However I need clang10, which I'm currently in the process of building.
I clone the git from https://aur.archlinux.org/clang10.git and create with
makepkg -si
Unfortunately I recieve
==> Starting prepare()...
mkdir: cannot create directory ‘build’: File exists
==> ERROR: A failure occurred in prepare().
Aborting...
What might the problem be? Anything I can provide to further help debug the issue?
I have tried removing the folder and rebuilding to no avail.
While making this post I tried modifying the MAKEPKG with some... eh... not so smart modifications (change mkdir BUILD -> mkdir -p), I then recieved the issue:
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Aborting...
This error only occured once, now I get the first issue again when trying to run
makepkg -si
Any and all help is appreciated
Thx
Last edited by hay (Yesterday 12:13:23)
Offline
Clean your build dir, or build in a clean chroot.
For the second error, we need the actual error, not just the result of the error.
Offline
thanks for responding
I'm kinda in deep waters here as I don't know what I'm doing entirely...
I' havent built with in a clean chroot before... I'm trying to follow the instructions over at DeveloperWiki:Building_in_a_clean_chroot.
When I run
makechrootpkg -c -r $CHROOT
inside of the clang10 directory
I end up with some missing dependencies
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
-> llvm10
-> cmake
-> ninja
-> python-sphinx
-> python2
However all of those are already installed.
I try to pre-install them with
$ makechrootpkg -c -r $CHROOT -I ninja-1.12.1-1-x86_64.pkg.tar.zst -I python2-2.7.18-8-x86_64.pkg.tar.zst -I python-sphinx-7.3.7-2-any.pkg.tar.zst -I llvm-10.0.1.src.tar.xz -I cmake-3.30.0-1-x86_64.pkg.tar.zst -I llvm10-libs-10.0.1-3-x86_64.pkg.tar.zst
?
But I get
...snip
/usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ClangDiagnosticsEmitter.cpp:638:(.text._ZNK12_GLOBAL__N_121DiagnosticTextBuilder15PrintFatalErrorERKN4llvm5TwineE.isra.0+0x1a): undefined reference to `llvm::PrintFatalError(llvm::ArrayRef<llvm::SMLoc>, llvm::Twine const&)'
/usr/bin/ld: /tmp/ccNDQlMi.ltrans12.ltrans.o: in function `llvm::SmallVectorImpl<llvm::Init*>::operator=(llvm::SmallVectorImpl<llvm::Init*> const&) [clone .isra.0]':
/opt/llvm10/include/llvm/ADT/SmallVector.h:98:(.text._ZN4llvm15SmallVectorImplIPNS_4InitEEaSERKS3_.isra.0+0xd5): undefined reference to `llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)'
/usr/bin/ld: /tmp/ccNDQlMi.ltrans12.ltrans.o: in function `(anonymous namespace)::ASTPropsEmitter::Validator::validateType(clang::tblgen::PropertyType, clang::tblgen::WrappedRecord) [clone .isra.0]':
/usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ASTTableGen.h:265:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x3a): undefined reference to `llvm::Record::getValueAsString(llvm::StringRef) const'
/usr/bin/ld: /tmp/ccNDQlMi.ltrans12.ltrans.o: in function `(anonymous namespace)::ASTPropsEmitter::Validator::validateType(clang::tblgen::PropertyType, clang::tblgen::WrappedRecord) [clone .isra.0]':
/usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ClangASTPropertiesEmitter.cpp:347:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0xdb): undefined reference to `llvm::PrintError(llvm::ArrayRef<llvm::SMLoc>, llvm::Twine const&)'
/usr/bin/ld: /usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ClangASTPropertiesEmitter.cpp:348:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x115): undefined reference to `llvm::PrintNote(llvm::ArrayRef<llvm::SMLoc>, llvm::Twine const&)'
/usr/bin/ld: /tmp/ccNDQlMi.ltrans12.ltrans.o: in function `(anonymous namespace)::ASTPropsEmitter::Validator::validateType(clang::tblgen::PropertyType, clang::tblgen::WrappedRecord) [clone .isra.0]':
/usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ASTTableGen.h:283:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x149): undefined reference to `llvm::Record::getValueAsDef(llvm::StringRef) const'
/usr/bin/ld: /usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ASTTableGen.h:283:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x191): undefined reference to `llvm::Record::getValueAsDef(llvm::StringRef) const'
/usr/bin/ld: /usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ASTTableGen.h:314:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x1bd): undefined reference to `llvm::Record::getValueAsString(llvm::StringRef) const'
/usr/bin/ld: /tmp/ccNDQlMi.ltrans12.ltrans.o: in function `(anonymous namespace)::ASTPropsEmitter::Validator::validateType(clang::tblgen::PropertyType, clang::tblgen::WrappedRecord) [clone .isra.0]':
/usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ClangASTPropertiesEmitter.cpp:342:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x1fd): undefined reference to `llvm::PrintError(llvm::ArrayRef<llvm::SMLoc>, llvm::Twine const&)'
/usr/bin/ld: /tmp/ccNDQlMi.ltrans12.ltrans.o: in function `(anonymous namespace)::ASTPropsEmitter::Validator::validateType(clang::tblgen::PropertyType, clang::tblgen::WrappedRecord) [clone .isra.0]':
/usr/src/debug/clang10/clang-10.0.1.src/utils/TableGen/ASTTableGen.h:318:(.text._ZN12_GLOBAL__N_115ASTPropsEmitter9Validator12validateTypeEN5clang6tblgen12PropertyTypeENS3_13WrappedRecordE.isra.0+0x241): undefined reference to `llvm::Record::getValueAsString(llvm::StringRef) const'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /home/hay/chroot/ojo/build
Offline
Have you tried building llvm10 with LTO disabled? https://aur.archlinux.org/packages/llvm … ent-897984
Edit:
Instead of disabling LTO using fat lto objects appears to work:
diff for llvm10
diff --git a/PKGBUILD b/PKGBUILD
index ae7e00f..f24ea75 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,6 +30,8 @@ prepare() {
}
build() {
+ CFLAGS+=' -ffat-lto-objects'
+ CXXFLAGS+=' -ffat-lto-objects'
cd "$srcdir/llvm-$pkgver.src/build"
cmake .. -G Ninja \
diff for clang10 (clang10 will build without these changes but beignet might need the LTO changes, the python2 changes were so I could avoid building it)
diff --git a/PKGBUILD b/PKGBUILD
index cd742cb..f1f9067 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ arch=('x86_64')
url="https://clang.llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('llvm10-libs' 'gcc' 'compiler-rt')
-makedepends=('llvm10' 'cmake' 'ninja' 'python-sphinx' 'python2')
+makedepends=('llvm10' 'cmake' 'ninja' 'python-sphinx') # 'python2')
optdepends=('openmp: OpenMP support in clang with -fopenmp'
'python: for scan-view and git-clang-format'
'llvm: referenced by some clang headers')
@@ -61,6 +61,8 @@ prepare() {
}
build() {
+ CFLAGS+=' -ffat-lto-objects'
+ CXXFLAGS+=' -ffat-lto-objects'
cd "$srcdir/$_pkgname-$pkgver.src/build"
export PATH=/opt/llvm10/bin:$PATH
@@ -117,7 +119,7 @@ package() {
sed -i 's|libexec|lib/clang|' "$pkgdir/opt/llvm10/bin/scan-build"
# Install Python bindings
- for _py in 2.7 3.8; do
+ for _py in 3.12; do
install -d "$pkgdir/opt/llvm10/lib/python$_py/site-packages"
cp -a ../bindings/python/clang "$pkgdir/opt/llvm10/lib/python$_py/site-packages/"
_python${_py%%.*}_optimize "$pkgdir/opt/llvm10/lib/python$_py"
@@ -129,7 +131,7 @@ package() {
touch -d @$SOURCE_DATE_EPOCH "$pkgdir"/opt/llvm10/share/$_pkgname/run-find-all-symbols.py
# Compile Python scripts
- _python2_optimize "$pkgdir/opt/llvm10/share/clang"
+# _python2_optimize "$pkgdir/opt/llvm10/share/clang"
_python3_optimize "$pkgdir/opt/llvm10/share" -x 'clang-include-fixer|run-find-all-symbols'
}
Last edited by loqs (2024-07-08 23:17:07)
Offline
I try to pre-install them with
$ makechrootpkg -c -r $CHROOT -I ninja-1.12.1-1-x86_64.pkg.tar.zst -I python2-2.7.18-8-x86_64.pkg.tar.zst -I python-sphinx-7.3.7-2-any.pkg.tar.zst -I llvm-10.0.1.src.tar.xz -I cmake-3.30.0-1-x86_64.pkg.tar.zst -I llvm10-libs-10.0.1-3-x86_64.pkg.tar.zst
Programs that are in repos don't need to be added with -I , but you made in error in the command .
Removing the entries that are in repos to mke the error stand out more
-I python2-2.7.18-8-x86_64.pkg.tar.zst -I llvm-10.0.1.src.tar.xz -I llvm10-libs-10.0.1-3-x86_64.pkg.tar.zst
Hay, please take a good look and tell us what the error is.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thanks to everyone for replying.
I found out that I' was in need of the package
pocl 6.0-2
for hashcat to function.
So my original problem is kinda sorted.
For the thread itself.. I have not managed to properly install clang10.
I followed loqs instructions and modified the PKGBUILD file per his instructions, but during makepkg -si first the web browser crashes, before terminal eventually crashes. Multiple attempts tried.
Removing the entries that are in repos to mke the error stand out more
-I python2-2.7.18-8-x86_64.pkg.tar.zst -I llvm-10.0.1.src.tar.xz -I llvm10-libs-10.0.1-3-x86_64.pkg.tar.zst
Hay, please take a good look and tell us what the error is.
I tried using .src instead of .pkg it seems like.
Note: I tried creating the makepkg -si in normal mode again instead of a clean chroot...
I will update if a clean chroot install helps solve the problem after modifying the PKGBUILD file.
Offline
Was there anything in the journal after the crashes that might indicate the causes?
Offline
this said blah blah im a horrible reader <-
although i did learn a bit about cmake <-
Last edited by fspkwon (2024-08-04 03:38:00)
Offline
Both disabling LTO and applying the diff I provided worked for me. Please post the PKGBUILD if you have made any changes from clang10 along with the invocation of makepkg you used and its full output.
Offline
this one said blah blah blah let me try to fix it myself whether i was right or not -crunch- the world will never know
Last edited by fspkwon (2024-08-04 03:38:28)
Offline
Do either of the solutions I have provided work for you?
Offline
ill see if thats what and try to help with the issue <- yeah it works after building it with a 20gb tmpfs my swap partitions 40gb and have 16gb ram : so the patch and needs a bigger tmpfs than usual: so follow that little edit ruling out python and changing the useflags <- and then make a bigger tmpfs and itll build just fine ill go ahead and test beignet since thats where i think people were complaining from: beignet has built perfectly fine: now as for that guy giving me the stare over there<-..... lol whats wrong with xnine-git now..
tmpfs /tmp tmpfs rw,nodev,nosuid,size=20G 0 0
Last edited by fspkwon (2024-08-04 03:41:43)
Offline
Retried and package created succesfully with
makepkg -Si
==> Source package created: clang10 (Wed 20 Nov 2024 01:10:30 PM CET)
Offline
makepkg -Si
Did you intend to build a source package or did you mistype
makepkg -si
Offline