Comment 10 for bug 1804771

Revision history for this message
Gabriel Staples (ercaguy) wrote :

Thanks @Seth and @Jean-pierre. I have finally got it to compile! After this I feel like I have just accomplished some great feat. It was quite the challenge. >12 hrs effort. I think I could duplicate the effort in far less time now though, and I have taken careful notes to help the next person. I have posted my full notes in my first post above. Hopefully they help the next poor soul who decides to try compiling from source.

The final fix that I needed to do to make it work is detailed in my notes above, but ultimately it was so simply downgrade swig from swig 4 to swig 3 (I used 3.0.12 to be exact), and then to reboot, clean out the entire build directory like @Seth suggested, and build again. Then, it worked! I ended up implementing @Jean-Pierre's suggestion too, but it built at that point even without that in place.

My final build commands ended up being:
    cd <your kicad source mirror>
    mkdir -p build/release
    mkdir build/debug # Optional for debug build.
    cd build/release
    cmake -DCMAKE_BUILD_TYPE=Release -DKICAD_SCRIPTING=OFF -DKICAD_SCRIPTING_MODULES=OFF -DKICAD_SCRIPTING_WXPYTHON=OFF -DKICAD_SCRIPTING_ACTION_MENU=OFF -DSWIG_EXECUTABLE="/usr/local/bin/swig" ../../
    make -j8

Note my full cmake command with all of the defines.

------------------------------
NOW MY FINAL QUESTION I THINK:
------------------------------
I did *not* run `sudo make install` for fear of it interfering with my official KiCad nightly and KiCad stable installs, both of which are already present. But, this means KiCad doesn't work quite right, as I have to manually run pcbnew, eeschema, etc, from my build/release folder, rather than letting the main kicad app open them up (it won't). Am I correct in my fear against running `sudo make install`, or can I safely run it somehow?