On 1/22/23 07:42 PM, William Douglas wrote:
Just tried compiling the latest version of KiCad direct from source.  For the 
"INSTALL_PREFIX" I specified a directory within my home directory.  This was to 
prevent the new build from impacting my system.

After building I attempted to install as the current user.  This should be fine but it 
turned out to have problems.  Looks like "/usr/local/share/kicad/resources" is 
being written to despite the newly provided installation prefix.  Here is the result:

-- Installing: 
/home/william/Applications/kicad/share/applications/org.kicad.pcbnew.desktop
-- Installing: 
/home/william/Applications/kicad/share/applications/org.kicad.bitmap2component.desktop
-- Installing: /home/william/Applications/kicad/share/metainfo
-- Installing: 
/home/william/Applications/kicad/share/metainfo/org.kicad.kicad.metainfo.xml
CMake Error at resources/bitmaps_png/cmake_install.cmake:54 (file):
file cannot create directory: /usr/local/share/kicad/resources. Maybe need
administrative privileges.
Call Stack (most recent call first):
resources/cmake_install.cmake:63 (include)
cmake_install.cmake:57 (include)


FAILED: CMakeFiles/install.util
cd /home/william/Source/kicad/build/release && /usr/bin/cmake -P 
cmake_install.cmake
ninja: build stopped: subcommand failed.

It mostly works, but not all portions of the install script adhere to the 
requested install prefix.  I used the build command:

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo 
-DCMAKE_INSTALL_PREFIX=/home/william/Applications/kicad -G Ninja ../../

Performing a build / install into a user home folder should not require 
superuser privileges.  If there was a good reason then fine, but this error 
looks like an oversight so I thought I should make note of it here.

There are some additional variables that might be helpful.  For Fedora's nightly builds, 
which have to be installed into other than the system directories, we use the following, 
where the "%{foo}" stuff refers to macros, but you should be able to substitute 
your desired paths:

cmake \
    -DKICAD_SCRIPTING_WXPYTHON=ON \
    -DKICAD_USE_OCC=ON \
    -DKICAD_INSTALL_DEMOS=ON \
    -DKICAD_BUILD_QA_TESTS=OFF \
    -DKICAD_SPICE=ON \
    -DKICAD_BUILD_I18N=ON \
    -DKICAD_I18N_UNIX_STRICT_PATH=ON \
    -DKICAD_USE_EGL=OFF \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_INSTALL_PREFIX=%{kicad_prefix} \
    -DCMAKE_INSTALL_DATADIR=%{_datadir} \
    -DCMAKE_INSTALL_DOCDIR=%{_docdir} \
    -DDEFAULT_INSTALL_PATH=%{kicad_prefix} \
    -DKICAD_DATA=%{_datadir}/%{name} \
    -DKICAD_DOCS=%{_docdir}/%{name} \
    -DPYTHON_SITE_PACKAGE_PATH=%{kicad_python_path}

        Steve


--
You received this message because you are subscribed to the Google Groups "KiCad 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to devlist+unsubscr...@kicad.org.
To view this discussion on the web visit 
https://groups.google.com/a/kicad.org/d/msgid/devlist/20022802-210c-d7f6-08cb-dfa9b660b31d%40gmail.com.

Reply via email to