Giter Club home page Giter Club logo

Comments (6)

doe300 avatar doe300 commented on June 12, 2024

That part is compiled by the a custom clang command line. Since the CI (and I on my Raspberry Pis) also uses clang-7 for this, that should not fail.
Do you use some compiler wrapper (e.g. ccache) or some custom CC or CXX environment variables?

Can you try to build with the cmake flag -DVC4CL_STDLIB_PRECOMPILE=OFF to skip the erroneous step. And then after the build completes, do

  • <build folder>/src/vc4c --version and
  • <build folder>/src/vc4c --quiet --precompile-stdlib -o <output directory> <path/to/vc4cl-stdlib>/include/VC4CLStdLib.h

and post their outputs?

from vc4c.

jorisrobijn avatar jorisrobijn commented on June 12, 2024

The compile was successful. I got the following version below. I have not set CC or CCX. I think I have a faily standard stretch installation, no compiler wrapper installed that I know of. When trying the precompile, I got what looks like the same errors as last time, 51 warning and 128 errors. Do you want the full output? It's almost 8000 lines. Wat is the most convenient way to post it here?

pi@liveatc:~/src/VC4C/build$ src/vc4c --version
Running VC4C in version: 0.4.9999 (de768b5)
Build configuration: debug mode; multi-threaded optimization; builtin SPIR-V front-end; LLVM library front-end with libLLVM 7; vc4asm verification

Standard library location:
Failed to find standard library files!
Pre-compilation: Required VC4CL standard library file not found in any of the provided paths: /home/pi/src/VC4C/../VC4CLStdLib/include/, /home/pi/.cache/vc4c, /usr/local/share/vc4cc/, /usr/local/include/vc4cl-stdlib/, /usr/include/vc4cl-stdlib/
Tool locations:
        clang in /usr/bin/clang (default)
        llvm-spirv not in $PATH
        llvm-link in /usr/bin/llvm-link (default)
        opt in /usr/bin/opt (default)
        llvm-dis in /usr/bin/llvm-dis (default)
        llvm-as in /usr/bin/llvm-as (default)
        spirv-link not in $PATH

from vc4c.

doe300 avatar doe300 commented on June 12, 2024

What does /usr/bin/clang --version print?

I don't need the full output, but can you post the first few lines (maybe until the first error) of the following command? The logged clang command etc. is more interesting than the error dump itself.

<build folder>/src/vc4c --verbose --precompile-stdlib -o <output directory> <path/to/vc4cl-stdlib>/include/VC4CLStdLib.h

Edit:
Do you have the necessary OpenCL libraries installed? Especially opencl-c-headers and opencl-headers?

from vc4c.

jorisrobijn avatar jorisrobijn commented on June 12, 2024
pi@liveatc:~/src/VC4C$ clang --version
Raspbian clang version 3.5.0-10+rpi1 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: arm-unknown-linux-gnueabihf
Thread model: posix

But cmake detects 7.0.1, which is also installed:

pi@liveatc:~/src/VC4C/build$ clang-7 --version
clang version 7.0.1-8~deb9u4 (tags/RELEASE_701/final)
Target: armv7l-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/bin

ii  opencl-c-headers    2.1-1          all            OpenCL (Open Computing Language) C header f
ii  opencl-clhpp-header 2.0.10-1       all            C++ headers for OpenCL development
un  opencl-clhpp-header <none>         <none>         (no description available)
ii  opencl-headers      2.1-1          all            OpenCL (Open Computing Language) header fil

You want to see what clang command line is issued by your precompile action. How do I get to see that? I didn't see the actual issued command lines yet anywhere.

from vc4c.

doe300 avatar doe300 commented on June 12, 2024

If you run

<build folder>/src/vc4c --verbose --precompile-stdlib -o <output directory> <path/to/vc4cl-stdlib>/include/VC4CLStdLib.h

it should be printed in the first lines.

But since clang is reported to be 3.5.0 this is could be the problem, since clang 3.5 is far too old. To use the clang-7, you could configure cmake with the -DCLANG_FOUND=/usr/bin/clang-7 parameter, this should fix the compilation errors.

The underlying problem is probably in https://github.com/doe300/VC4C/blob/master/cmake/clang.cmake#L6, because the non-versioned (default) clang is prefered over any supported version. And on your system the non-versioned clang is 3.5.

It could be required that you also manually set the LLVM_LINK_FOUND and other variables checked in this file.

from vc4c.

jorisrobijn avatar jorisrobijn commented on June 12, 2024

Instead I changed the symbolic link of clang from 3.5 to 7.0.1, and the retried. Now it did precompile fine. So although it detects clang 7 specifically (see my earlier output), it doesn't use it, and as you wrote it uses the versionless clang command.
This is apparently the case on stretch, installing clang-7 doesn't change the clang symbolic link.
Thanks!

from vc4c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.