Skip to content

macOS Monterey compiling script #138

Description

@Fourthbus

Tested and working partly so far.
Working with .img file. Not working with SD card (Raspberry Pi SD card tested, input: fuse-ext2 /dev/disk2 ~/mnt/ext/ with nothing returned to the command line, nor anything mounted).

[OS] macOS Monterey 12.6.3
[device] MacBook Pro (15-inch, 2017)
[processor] i7-7920

#!/bin/sh
export PATH=/opt/gnu/bin:$PATH
export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

mkdir fuse-ext2.build
cd fuse-ext2.build

if [ ! -d fuse-ext2 ]; then
    git clone https://github.com/alperakcan/fuse-ext2.git	
fi

# m4
if [ ! -f m4-latest.tar.gz ]; then
    curl -O -L http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz
fi
tar -zxvf m4-latest.tar.gz 
cd m4-*
./configure --prefix=/opt/gnu
make -j 16
sudo make install
cd ../
    
# autoconf
if [ ! -f autoconf-latest.tar.gz ]; then
    curl -O -L http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
fi
tar -zxvf autoconf-latest.tar.gz 
cd autoconf-*
./configure --prefix=/opt/gnu
make
sudo make install
cd ../
    
# automake
if [ ! -f automake-1.16.5.tar.gz ]; then
    curl -O -L http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz
fi
tar -zxvf automake-1.16.5.tar.gz 
cd automake-1.16.5
./configure --prefix=/opt/gnu
make
sudo make install
cd ../
    
# libtool
if [ ! -f libtool-2.4.7.tar.gz ]; then
    curl -O -L http://ftpmirror.gnu.org/libtool/libtool-2.4.7.tar.gz
fi
tar -zxvf libtool-2.4.7.tar.gz 
cd libtool-2.4.7
./configure --prefix=/opt/gnu
make
sudo make install
cd ../

# e2fsprogs
if [ ! -f e2fsprogs-1.46.6.tar.gz ]; then
    curl -O -L https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.46.6/e2fsprogs-1.46.6.tar.gz
fi
tar -zxvf e2fsprogs-1.46.6.tar.gz
cd e2fsprogs-1.46.6
./configure --prefix=/opt/gnu --disable-nls
make
sudo make install
sudo make install-libs
sudo cp /opt/gnu/lib/pkgconfig/* /usr/local/lib/pkgconfig
cd ../
    
# fuse-ext2
export PATH=/opt/gnu/bin:$PATH
export PKG_CONFIG_PATH=/opt/gnu/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

cd fuse-ext2
./autogen.sh
CFLAGS="-idirafter/opt/gnu/include -idirafter/usr/local/include/fuse/" LDFLAGS="-L/opt/gnu/lib -L/usr/local/lib" ./configure
make
sudo make install

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions