To remove the boost references a little easier, you can download manually, run makepkg, let it fail, then edit the files. This AI made sh script will help.
#!/bin/bash
# Find all files that contain the reference
echo "Searching for files containing BOOST_NO_CXX11_RVALUE_REFERENCES=1..."
# Process CMakeLists.txt files to remove add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES=1)
find src -name "CMakeLists.txt" -type f -exec grep -l "BOOST_NO_CXX11_RVALUE_REFERENCES=1" {} \; | while read file; do
echo "Processing $file"
# Replace the line with add_definitions or remove it completely if it's the only definition
sed -i 's/add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES=1)//g' "$file"
sed -i 's/add_definitions(\(.*\)-DBOOST_NO_CXX11_RVALUE_REFERENCES=1\(.*\))/add_definitions(\1\2)/g' "$file"
# Clean up any empty add_definitions() that might be left
sed -i 's/add_definitions()//g' "$file"
# Clean up any double spaces or empty lines
sed -i 's/ / /g' "$file"
sed -i '/^$/d' "$file"
done
# Process flags.make files
find src -name "flags.make" -type f -exec grep -l "BOOST_NO_CXX11_RVALUE_REFERENCES=1" {} \; | while read file; do
echo "Processing $file"
# Replace BOOST_NO_CXX11_RVALUE_REFERENCES=1 in defines lines
sed -i 's/-DBOOST_NO_CXX11_RVALUE_REFERENCES=1 //g' "$file"
sed -i 's/ -DBOOST_NO_CXX11_RVALUE_REFERENCES=1//g' "$file"
done
# Process DependInfo.cmake files
find src -name "DependInfo.cmake" -type f -exec grep -l "BOOST_NO_CXX11_RVALUE_REFERENCES=1" {} \; | while read file; do
echo "Processing $file"
# Remove lines containing just this define
sed -i '/ "BOOST_NO_CXX11_RVALUE_REFERENCES=1"/d' "$file"
done
# Process AutogenInfo.json and similar files
find src -name "AutogenInfo.json" -o -name "AutogenInfo.cmake" -o -name "AutomocOldMocDefinitions.cmake" -type f -exec grep -l "BOOST_NO_CXX11_RVALUE_REFERENCES=1" {} \; | while read file; do
echo "Processing $file"
# Replace the flag in JSON files
sed -i 's/"BOOST_NO_CXX11_RVALUE_REFERENCES=1",//g' "$file"
sed -i 's/"BOOST_NO_CXX11_RVALUE_REFERENCES=1;//g' "$file"
sed -i 's/BOOST_NO_CXX11_RVALUE_REFERENCES=1;//g' "$file"
done
# Process source and header files with direct #define statements
echo "Processing C/C++ source and header files..."
find src -name "*.cpp" -o -name "*.hpp" -o -name "*.h" -o -name "*.c" -type f -exec grep -l "BOOST_NO_CXX11_RVALUE_REFERENCES 1" {} \; | while read file; do
echo "Processing C/C++ file $file"
# Remove the #define line
sed -i '/#define BOOST_NO_CXX11_RVALUE_REFERENCES 1/d' "$file"
done
echo "Completed. All references to BOOST_NO_CXX11_RVALUE_REFERENCES=1 have been removed."
# Optional: Verify that references have been removed
echo "Verifying removal..."
echo "Checking for both formats of the definition..."
found_references=0
# Check first format (with equals sign)
echo "Checking format: BOOST_NO_CXX11_RVALUE_REFERENCES=1"
if grep -r "BOOST_NO_CXX11_RVALUE_REFERENCES=1" src; then
found_references=1
fi
# Check second format (with space)
echo "Checking format: BOOST_NO_CXX11_RVALUE_REFERENCES 1"
if grep -r "BOOST_NO_CXX11_RVALUE_REFERENCES 1" src; then
found_references=1
fi
if [ $found_references -eq 1 ]; then
echo "Warning: Some references might remain. Check the output above."
else
echo "Success: All references have been removed!"
fi
After, use makepkg -si --noextract to install without undoing your work.
Pinned Comments
tecnotercio commented on 2022-09-05 03:32 (UTC)
If you have a problem with Epson Scan 2, check if you need to install another backend for your scanner. More information on the Arch Linux wiki:
https://wiki.archlinux.org/title/SANE/Scanner-specific_problems#Epson