LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   where to find libvulkan 32bit (https://www.linuxquestions.org/questions/slackware-14/where-to-find-libvulkan-32bit-4175635477/)

spike86 08-01-2018 05:10 PM

where to find libvulkan 32bit
 
Hello guys (and gals, if any) after a few hours of trial and error (and new stuff to learn) I've managed to have a fully working vulkan enviroment for my 14.2 64bit (multilib)

In the end the only necessary thing was to install vulkansdk fron sbo (which also installs the /usr/lib64/libvulkan thing)

Now, while building wine 3.13 with wow64 and vulkan support, I've came across an error, saying that I miss 32bit libvulkan and 32bit moltenvk... which is true, in /usr/lib there's no trace of them...

So, the question is: where do I find the 32bit libraries?
I've looked for them in Lunar's site, but no luck, it seems that lunar's vulkansdk support ONLY 64bit...

Maybe I'm missing something obvius, but I can't really find the 32bit version anywhere (exept for some precompiled RPM on random websites... which I would prefer to avoid)

Any clue?

Thanks in advance!

orbea 08-01-2018 05:25 PM

It would need to be built for source where the SBo script is a binary repackaging, see vulkan from the main tree for current. I'm not sure what the issue with building it for 14.2 is?

USUARIONUEVO 08-01-2018 05:25 PM

You need to read the multilib instructions to build 32bit packages.

https://docs.slackware.com/slackware:multilib

see the section "Compiling 32-bit programs" , to build packages in 32bit

dugan 08-01-2018 07:45 PM

Make a 32-bit 14.2 VM.

Use the -current SlackBuild to build the Vulkan SDK in the 32-bit 14.2 VM.

LunarG provides 64-bit SDK binary packages but not 32-bit SDK packages. However, they also provide the sources used to build those packages.

spike86 08-02-2018 01:50 PM

Quote:

Originally Posted by orbea (Post 5886646)
It would need to be built for source where the SBo script is a binary repackaging, see vulkan from the main tree for current. I'm not sure what the issue with building it for 14.2 is?

Ok, I will try building it then, didn't noticed that sbo's version was a binary repackage.
compiling should solve the problem.
Thank you!

Quote:

Originally Posted by USUARIONUEVO (Post 5886647)
You need to read the multilib instructions to build 32bit packages.

https://docs.slackware.com/slackware:multilib

see the section "Compiling 32-bit programs" , to build packages in 32bit

Thanks for the pointer!

Quote:

Originally Posted by dugan (Post 5886689)
Make a 32-bit 14.2 VM.

Use the -current SlackBuild to build the Vulkan SDK in the 32-bit 14.2 VM.

LunarG provides 64-bit SDK binary packages but not 32-bit SDK packages. However, they also provide the sources used to build those packages.

Thanks, if I'll not manage building with multilib, I'll try that!



________________

Thanks to all, as soon as I'll have a little time I'll try your suggestions and report back.
Bye

spike86 08-02-2018 04:25 PM

Ok, I've tried to compile the Slackbuild found here: https://mirrors.slackware.com/slackw.../x/vulkan-sdk/
BUT it fails...

Of course, before trying I've done a
Code:

. /etc/profile.d/32dev.sh
----------1st try: with ARCH=i586, as suggested in the compat32 docs
Code:

spike@spikeship (32bit):~/Scrivania/vulkan-sdk$ sudo ARCH=i586 ./vulkan-sdk.SlackBuild
[BIGSNIP]
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

  It fails with the following output:
  Change Dir: /tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/external/glslang/build/CMakeFiles/CMakeTmp
  Run Build Command:"/usr/bin/gmake" "cmTC_0e06d/fast"
  /usr/bin/gmake -f CMakeFiles/cmTC_0e06d.dir/build.make
  CMakeFiles/cmTC_0e06d.dir/build
  gmake[1]: ingresso nella directory
  "/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/external/glslang/build/CMakeFiles/CMakeTmp"
  Building C object CMakeFiles/cmTC_0e06d.dir/testCCompiler.c.o
  /usr/bin/cc -O2 -march=i586 -mtune=i686 -o
  CMakeFiles/cmTC_0e06d.dir/testCCompiler.c.o -c
  /tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/external/glslang/build/CMakeFiles/CMakeTmp/testCCompiler.c
 
  /tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/external/glslang/build/CMakeFiles/CMakeTmp/testCCompiler.c:1:0:
  error: CPU you selected does not support x86-64 instruction set

  #ifdef __cplusplus
  ^
  /tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/external/glslang/build/CMakeFiles/CMakeTmp/testCCompiler.c:1:0:
  error: CPU you selected does not support x86-64 instruction set

----------2nd try: without the ARCH variabile
Code:

spike@spikeship (32bit):~/Scrivania/vulkan-sdk$ sudo ./vulkan-sdk.SlackBuild
make[2]: uscita dalla directory "/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/build"
[ 96%] Built target VkLayer_object_tracker-json
make[2]: uscita dalla directory "/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/build"
CMakeFiles/Makefile2:680: set di istruzioni per l'obiettivo "layers/CMakeFiles/VkLayer_parameter_validation.dir/all" non riuscito
make[1]: *** [layers/CMakeFiles/VkLayer_parameter_validation.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....
[ 97%] Linking CXX shared library libVkLayer_core_validation.so
cd /tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/build/layers && /usr/bin/cmake -E cmake_link_script CMakeFiles/VkLayer_core_validation.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC -O2 -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fno-builtin-memcmp -std=c++11 -fno-rtti -fvisibility=hidden -Wpointer-arith -Wno-unused-function -Wno-sign-compare -O3 -DNDEBUG -Wl,-Bsymbolic,--exclude-libs,ALL -shared -Wl,-soname,libVkLayer_core_validation.so -o libVkLayer_core_validation.so CMakeFiles/VkLayer_core_validation.dir/core_validation.cpp.o CMakeFiles/VkLayer_core_validation.dir/vk_layer_table.cpp.o CMakeFiles/VkLayer_core_validation.dir/descriptor_sets.cpp.o CMakeFiles/VkLayer_core_validation.dir/buffer_validation.cpp.o CMakeFiles/VkLayer_core_validation.dir/shader_validation.cpp.o CMakeFiles/VkLayer_core_validation.dir/xxhash.c.o ../libVkLayer_utils.so ../../external/glslang/build/External/spirv-tools/source/opt/libSPIRV-Tools-opt.a ../../external/glslang/build/External/spirv-tools/source/libSPIRV-Tools.a
make[2]: uscita dalla directory "/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/build"
[ 97%] Built target VkLayer_core_validation
make[1]: uscita dalla directory "/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/build"
Makefile:127: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2
[SNIP!]
Scanning dependencies of target VkLayer_core_validation-json
[SNIP!]
[ 48%] Built target VkLayer_unique_objects-json
[ 49%] Building CXX object layers/CMakeFiles/VkLayer_parameter_validation.dir/parameter_validation_utils.cpp.o
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp: In lambda function:
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp:1148:13: error: ‘__builtin_isnan’ is not a member of ‘std’
        if (std::isnan(v1_f)) return false;
            ^
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp:1148:13: note: suggested alternative:
<built-in>: note:  ‘__builtin_isnan’

----------
Now, I've really no clue on what to do....
some info:
Code:

uname -a
Linux spikeship 4.14.59-spikeship #1 SMP PREEMPT Sat Jul 28 16:48:27 CEST 2018 x86_64 AMD Athlon(tm) II X3 440 Processor AuthenticAMD GNU/Linux

gcc:
gcc-5.5.0_multilib-x86_64-1alien
gcc-g++-5.5.0_multilib-x86_64-1alien

cmake:
cmake-3.5.2-x86_64-1

Note that I've successfully compiled a whole lot of other programs in 32bit, although only with the help of a "sboinstall -p" command
Any clue on what to do now?

orbea 08-02-2018 04:30 PM

I have two suggestions, first use an english locale, it makes it easier to read your logs. Second try building it for 64-bit first, it could make debugging it easier with the reduced complexity.

spike86 08-09-2018 10:32 AM

Hello again guys, no luck compiling 64bit Vulkan:

Code:

make: *** [all] Error 2
[  9%] Built target generate_helper_files
[ 15%] Built target VkLayer_utils
[ 17%] Built target loader_gen_files
[ 19%] Built target asm_offset
[ 20%] Built target loader_asm_gen_files
[ 32%] Built target vulkan
[ 32%] Built target VkLayer_unique_objects-staging-json
[ 39%] Built target VkLayer_core_validation
Scanning dependencies of target VkLayer_core_validation-json
[ 39%] Built target VkLayer_core_validation-json
[ 39%] Built target VkLayer_object_tracker-staging-json
[ 39%] Built target VkLayer_standard_validation-staging-json
[ 44%] Built target VkLayer_threading
[ 44%] Built target VkLayer_threading-json
[ 44%] Built target VkLayer_standard_validation-json
[ 44%] Built target VkLayer_core_validation-staging-json
[ 48%] Built target VkLayer_unique_objects
[ 48%] Built target VkLayer_unique_objects-json
[ 49%] Building CXX object layers/CMakeFiles/VkLayer_parameter_validation.dir/parameter_validation_utils.cpp.o
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp: In lambda function:
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp:1148:13: error: ‘__builtin_isnan’ is not a member of ‘std’
        if (std::isnan(v1_f)) return false;
            ^
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp:1148:13: note: suggested alternative:
<built-in>: note:  ‘__builtin_isnan’

Any idea on what I miss?

Let's suppose that my slackware 14.2, while updated, it's still plain vanilla 64bit, what packages would I miss to compile that?

Could it have anything to do with lambda? however can't find anything in SBo...

orbea 08-09-2018 10:45 AM

Its a general build issue, not a dependency issue. I think its an old glibc bug, but I'm not sure the best way to solve it short of upgrading to current. You can check out this similar issue report for some other ideas.

https://github.com/opencv/opencv/issues/10032

spike86 08-10-2018 12:59 PM

Quote:

Originally Posted by orbea (Post 5889831)
Its a general build issue, not a dependency issue. I think its an old glibc bug, but I'm not sure the best way to solve it short of upgrading to current. You can check out this similar issue report for some other ideas.

https://github.com/opencv/opencv/issues/10032


Oh, that's bad...

Well, thank you and thanks to all the ones who replied this thread for the kind help.

I'll see what to do next,
Bye

chris.willing 08-10-2018 08:09 PM

Quote:

Originally Posted by spike86 (Post 5889828)
Hello again guys, no luck compiling 64bit Vulkan:

Code:

make: *** [all] Error 2
...
[ 49%] Building CXX object layers/CMakeFiles/VkLayer_parameter_validation.dir/parameter_validation_utils.cpp.o
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp: In lambda function:
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp:1148:13: error: ‘__builtin_isnan’ is not a member of ‘std’
        if (std::isnan(v1_f)) return false;
            ^
/tmp/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/layers/parameter_validation_utils.cpp:1148:13: note: suggested alternative:
<built-in>: note:  ‘__builtin_isnan’

Any idea on what I miss?

Let's suppose that my slackware 14.2, while updated, it's still plain vanilla 64bit, what packages would I miss to compile that?

Could it have anything to do with lambda? however can't find anything in SBo...

Works for me on 64bit 14.2 after adding the line:
Code:

sed  -i -e '/#include/i#include <cmath>\n' layers/parameter_validation_utils.cpp
in -current's SlackBuild just before the commented out line: # chown -R root:root .

chris

spike86 08-19-2018 07:18 AM

SOLVED!
 
Quote:

Originally Posted by chris.willing (Post 5890380)
Works for me on 64bit 14.2 after adding the line:
Code:

sed  -i -e '/#include/i#include <cmath>\n' layers/parameter_validation_utils.cpp
in -current's SlackBuild just before the commented out line: # chown -R root:root .

chris

WOW thank you! It worked ideed!

But i've found out it's not enough to build the 32bit version on multilib.

After a few researches I've found the solution to that too, I'll leave it here for whoever will need that in the future:

Code:

. /etc/profile.d/32dev.sh
ARCH=i586 ASFLAGS=--32 ./vulkan-sdk.SlackBuild

Without the ASFLAG snippet it was failing complaining to asm stuff.
I'm nowhere near expert on multilib things, but shouldn't asm flags be part of the 32dev.sh profile, just as the m32 cflags and cxxflags?

Anyway, thanks to all of you guys, problem SOLVED!


All times are GMT -5. The time now is 05:36 PM.