ungoogled-software / ungoogled-chromium-portablelinux

Portable Linux packaging for ungoogled-chromium
96 stars 30 forks source link

export: `-B/usr/lib/llvm-13/bin': not a valid identifier #129

Closed ajgringo619 closed 2 years ago

ajgringo619 commented 2 years ago

This is my first attempt at building, so bear with me.

Using Linux Mint 20.3, I've installed all of the clang-13 packages from the LLVM Ubuntu repo. The download and subsequent unpacking seems to go OK. The problem is with one of the export statements in build.sh. Here's the output from the export statements leading up to the error:

+ export LLVM_VERSION=13
+ LLVM_VERSION=13
+ export AR=llvm-ar-13
+ AR=llvm-ar-13
+ export NM=llvm-nm-13
+ NM=llvm-nm-13
+ export CC=clang-13
+ CC=clang-13
+ export CXX=clang++-13
+ CXX=clang++-13
+ export LLVM_BIN=/usr/lib/llvm-13/bin
+ LLVM_BIN=/usr/lib/llvm-13/bin
++ clang-13 --print-resource-dir
+ _llvm_resource_dir=/usr/lib/llvm-13/lib/clang/13.0.1
+ export CXXFLAGS+=-resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1 -B/usr/lib/llvm-13/bin
+ CXXFLAGS+=-resource-dir=/usr/lib/llvm-13/lib/clang/13.0.1
./build.sh: line 38: export: `-B/usr/lib/llvm-13/bin': not a valid identifier

Line 38 is this: export CXXFLAGS+=-resource-dir=${_llvm_resource_dir} -B${LLVM_BIN}.

ajgringo619 commented 2 years ago

Same error on Debian 11.

Aufschlauer commented 2 years ago

I changed build.sh like this:

export CXXFLAGS+="-resource-dir=${_llvm_resource_dir} -B${LLVM_BIN}"
export CPPFLAGS+="-resource-dir=${_llvm_resource_dir} -B${LLVM_BIN}"
export CFLAGS+="-resource-dir=${_llvm_resource_dir} -B${LLVM_BIN}"
ajgringo619 commented 2 years ago

Good catch! I'm surprised this hasn't been noticed before now; simple missing quotes...