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

Issue generating bytes #6432

Open
half-potato opened this issue Feb 23, 2025 · 5 comments
Open

Issue generating bytes #6432

half-potato opened this issue Feb 23, 2025 · 5 comments
Labels
Needs reporter feedback Bugs awaiting more information from the reporter

Comments

@half-potato
Copy link

This is happening on Manjaro, with all of the most recent libraries and GCC.

In file included from /home/amai/slang/source/slang-core-module/slang-embedded-core-module.cpp:8:
/home/amai/slang/build/source/slang-core-module/slang-core-module-generated.h:484723:1: error: ‘x00’ was not declared in this scope
484723 | x00, 0xa3,
       | ^~~
[ 78%] Built target slang-glsl-module

Here is the actual file:

0x01, 0xba, 0x01, 0x11, 0x00, 0xa3, 0x31, 0x80, 0x19, 0xfb, 0x3f, 0x80, 0x19, 0x01, 0xba, 0x02, 
0x11, 0x00, 0xa3, 0x40, 0x80, 0x19, 0xfb, 0x4e, 0x80, 0x19, 0x01, 0xba, 0x03, 0x11, 0x00, 0xa3, 
0x4f, 0x80, 0x19, 0xfb, 0x5d, 0x80, 0x19, 0x01, 0xba, 0x04, 0x11, 0x00, 0xa3, 0x5e, 0x80, 0x19, 
0xfb, 0x6c, 0x80, 0x19, 0x01, 0xba, 0x05, 0x11, 0x00, 0xa3, 0x6d, 0x80, 0x19, 0xfb, 0x7b, 0x80, 
0x19, 0x01, 0xba, 0x06, 0x11, 0x00, 0xa3, 0x7c, 0x80, 0x19, 0xfb, 0x91, 0x80, 0x19, 0x01, 0xba, 
0x07, 0x11, 0x00, 0xa3, 0x92, 0x80, 0x19, 0xfb, 0xa7, 0x80, 0x19, 0x01, 0xba, 0x08, 0x11, 0x00, 
0xa3, 0xa8, 0x80, 0x19, 0xfb, 0xbd, 0x80, 0x19, 0x01, 0xba, 0x09, 0x11, 0x00, 0xf0, 0x00, 0xbe, 
0x80, 0x19, 0xfb, 0xd3, 0x80, 0x19, 0x01, 0xba, 0x0a, 0x01, 0xfa, 0xb6, 0x58, 0x00, 
x00, 0xa3, 
0xb0, 0x7f, 0x19, 0xfb, 0xbf, 0x7f, 0x19, 0x01, 0xb9, 0xfa, 0x11, 0x00, 0xa3, 0xc0, 0x7f, 0x19, 
0xfb, 0xd0, 0x7f, 0x19, 0x01, 0xb9, 0xfb, 0x11, 0x00, 0xa3, 0xd1, 0x7f, 0x19, 0xfb, 0xe1, 0x7f, 
0x19, 0x01, 0xb9, 0xfc, 0x11, 0x00, 0xa3, 0xe2, 0x7f, 0x19, 0xfb, 0xf2, 0x7f, 0x19, 0x01, 0xb9, 
0xfd, 0x11, 0x00, 0xa3, 0xf3, 0x7f, 0x19, 0xfb, 0x03, 0x80, 0x19, 0x01, 0xb9, 0xfe, 0x11, 0x00, 
0xa3, 0x04, 0x80, 0x19, 0xfb, 0x12, 0x80, 0x19, 0x01, 0xb9, 0xff, 0x11, 0x00, 0xa3, 0x13, 0x80, 
0x19, 0xfb, 0x21, 0x80, 0x19, 0x01, 0xba, 0x00, 0x11, 0x00, 0xa3, 0x22, 0x80, 0x19, 0xfb, 0x30, 
0x80, 0x19, 0x01, 0xba, 0x01, 0x11, 0x00, 0xa3, 0x31, 0x80, 0x19, 0xfb, 0x3f, 0x80, 0x19, 0x01, 

I am able to workaround this issue by simply correcting the missing 0 and newline.

@csyonghe
Copy link
Collaborator

What are the steps to reproduce this? We have never seen this kind of error on our CI or dev machines.

@half-potato
Copy link
Author

I've managed to reproduce this error on two separate machines running Manjaro with gcc (GCC) 14.2.1 20240910. In my experience, it's always GCC. Could be something else though.

@bmillsNV bmillsNV added the Needs reporter feedback Bugs awaiting more information from the reporter label Feb 27, 2025
@bmillsNV
Copy link
Collaborator

@half-potato we don't have this setup to reproduce the issue. Are you able to compile with Clang?

@half-potato
Copy link
Author

To reproduce:

# Use an NVIDIA CUDA base image that includes development libraries
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04

# Non-interactive mode for apt-get
ENV DEBIAN_FRONTEND=noninteractive

# Set an environment variable for OptiX installation.
# Adjust this to wherever you've placed OptiX inside the container or mount at runtime:
ENV OPTIX_INSTALL_DIR=/opt/OptiX_7.4

# ------------------------------------------------------
# 1) Install System Dependencies
# ------------------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
    wget \
    git \
    cmake \
    build-essential \
    libglew-dev \
    libassimp-dev \
    libboost-all-dev \
    libgtk-3-dev \
    libopencv-dev \
    libglfw3-dev \
    libavdevice-dev \
    libavcodec-dev \
    libeigen3-dev \
    libxxf86vm-dev \
    libembree-dev \
    libabsl-dev \
    libcgal-dev \
    libglm-dev \
    && rm -rf /var/lib/apt/lists/*

# ------------------------------------------------------
# 2) Install a Miniconda / Conda environment
#    - We use Miniconda3 as an example here.
# ------------------------------------------------------
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
    bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
    rm Miniconda3-latest-Linux-x86_64.sh

# Make conda available and create environment
ENV PATH="/opt/conda/bin:${PATH}"
RUN conda update -n base -c defaults conda && \
    conda create -n ever python=3.10 -y && \
    conda clean -ya

# By default, we activate conda env inside container with a script or using ENV:
SHELL ["/bin/bash", "-c"]
RUN echo "conda activate ever" >> ~/.bashrc

# ------------------------------------------------------
# 3) (Optional) Install Slang
#    Replace this section with the correct steps to install or build Slang from source if needed.
# ------------------------------------------------------
RUN git clone --recursive https://github.com/shader-slang/slang.git /opt/slang && \
    cd /opt/slang && \
    # Example: build from source; replace with actual Slang build instructions
    mkdir build && cd build && \
    cmake -DCMAKE_BUILD_TYPE=Release .. && \
    make -j"$(nproc)" && \
    make install

@saipraveenb25
Copy link
Collaborator

@half-potato: For the ever_training repo, do you need to compile Slang from scratch? Could you pull the pre-built binaries from here (https://github.com/shader-slang/slang/releases) instead? There's usually a release every other week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs reporter feedback Bugs awaiting more information from the reporter
Projects
None yet
Development

No branches or pull requests

4 participants