Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avrdude Python binding configuration improvement #1914

Open
leventelist opened this issue Aug 25, 2024 · 19 comments
Open

avrdude Python binding configuration improvement #1914

leventelist opened this issue Aug 25, 2024 · 19 comments
Labels
enhancement New feature or request

Comments

@leventelist
Copy link

leventelist commented Aug 25, 2024

I have a script that builds AVR toolchain, including avrdude. The sctipt installs the artifacts to a directory in my user's home. I've noticed that when I want to install v8.0, it directly targets /usr/local for installing some python module. Is there any workaround not doing it? I run my script as a normal user, and it keeps failing, as it is not writable by a non superuser.

I came up with this patch.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e358e4b1..7bef99ed 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -403,8 +403,10 @@ install(FILES "avrdude.1"
 	)
 
 if(HAVE_SWIG)
-    execute_process(COMMAND ${Python3_EXECUTABLE} -c "import site; print(site.getsitepackages()[0])"
-                    OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(NOT DEFINED PYTHON_SITE_PACKAGES)
+      execute_process(COMMAND ${Python3_EXECUTABLE} -c "import site; print(site.getsitepackages()[0])"
+                      OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+    endif()
     install(TARGETS swig_avrdude DESTINATION ${PYTHON_SITE_PACKAGES})
     install(FILES ${CMAKE_BINARY_DIR}/src/swig_avrdude.py DESTINATION ${PYTHON_SITE_PACKAGES})
     install(DIRECTORY python/ DESTINATION ${CMAKE_INSTALL_DATADIR}/avrdude FILES_MATCHING PATTERN "*.ui")

And call cmake with something like this: "-DPYTHON_SITE_PACKAGES=python"

@ndim
Copy link
Contributor

ndim commented Aug 26, 2024

For cases where you do not want to build the swig/python/avrdude-gui things at all, my quick hack workaround is to run

sed -i 's|^find_package(SWIG|# find_package(SWIG|' CMakeLists.txt

before running cmake for the first time.

@mcuee mcuee added the enhancement New feature or request label Aug 27, 2024
@ndim
Copy link
Contributor

ndim commented Aug 27, 2024

I would love to see a clean solution for installing a software package into a custom PREFIX but some things needing to be installed into a well-known directory which is not inside PREFIX.

In this case, this is about python sitedir, but the same thing acould also be bash completions dir, xdg icons dir, man page dir, etc.

Some of these directories could be accommodated by setting environment variables like PYTHONPATH, MANPATH, etc., but that becomes cumbersome very quick and is not even possible for some things.

Some things can be delegated to the person installing the package to do manually (or a OS package doing, like e.g. installing udev rules), but manually installing all the python files into the respective directories certainly is too much to ask.

Anyway... looking for a nice way to handle such things. Please tell me if you know one.

@mcuee
Copy link
Collaborator

mcuee commented Aug 28, 2024

I think it is easier to use CMake command line option to disable the Python binding. Let me try and give an option later.

As for installation of Python bindings, I think it is a tough topic especially under Windows (eg: MSVC), based on my experiences with libftdi project. So we would say to use manual instalation for Windows and try to automatic installation for other OS.

Reference libftdi:
http://developer.intra2net.com/git/?p=libftdi

FYI, I am kind of the Windows packager for libftdi binaries for Windows for a long time (2010 to 2020). Now MSYS2 mingw makes it simpler so it is not really needed any more.
https://sourceforge.net/projects/picusb/files/

@mcuee
Copy link
Collaborator

mcuee commented Sep 1, 2024

I was hoping ./build.sh -f "-D HAVE_SWIG=0" will work to disable Python bindings but it does not work.

@mcuee
Copy link
Collaborator

mcuee commented Sep 1, 2024

@leventelist and @ndim

I think there is kind of a bug here that the Python binding has kind of hard-coded path which does not honor CMAKE option: -D CMAKE_INSTALL_PREFIX:PATH=/home/mcuee/bin.

mcuee@PCRyzen5600G:~/build/avr/avrdude$ ./build.sh -f "-D BUILD_DOC=1 -D HAVE_LINUXGPIO=1 -D HAVE_PARPORT=1 -D HAVE_LINUXSPI=1 -D CMAKE_INSTALL_PREFIX:PATH=/home/mcuee/bin"
-- The C compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /usr/bin/git (found version "2.43.0") 
-- Found FLEX: /usr/bin/flex (found version "2.6.4") 
-- Found BISON: /usr/bin/bison (found version "3.8.2")
-- Looking for libelf.h
-- Looking for libelf.h - found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - not found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") 
-- Checking for module 'libgpiod'...
-- Found module 'libgpiod' (found version "1.6.3")
-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.2.0", minimum required is "4.0") found components: python 
-- Found Python3: /usr/bin/python3 (found version "3.12.3") found components: Interpreter Development Development.Module Development.Embed 
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- ENABLED    doc
-- ENABLED    parport
-- ENABLED    linuxgpio
-- DO HAVE    libgpiod (1.6.3)
-- ENABLED    linuxspi
-- DO HAVE    swig+Python3
-- ----------------------
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /home/mcuee/build/avr/avrdude/build_linux
... 


mcuee@PCRyzen5600G:~/build/avr/avrdude$ cmake --build build_linux --target install
[  0%] Built target conf
[ 42%] Built target libavrdude
[ 44%] Built target avrdude
[ 45%] Built target swig_avrdude_swig_compilation
[ 88%] Built target swig_avrdude
[ 88%] Built target avrdude_binaries
[ 92%] Built target info
[ 96%] Built target pdf
[100%] Built target html
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /home/mcuee/bin/bin/avrdude
-- Installing: /home/mcuee/bin/bin/elf2tag
-- Installing: /home/mcuee/bin/lib/libavrdude.a
-- Installing: /home/mcuee/bin/include/libavrdude.h
-- Installing: /home/mcuee/bin/include/libavrdude-avrintel.h
-- Installing: /home/mcuee/bin/etc/avrdude.conf
-- Installing: /home/mcuee/bin/share/man/man1/avrdude.1
-- Installing: /usr/local/lib/python3.12/dist-packages/_swig_avrdude.so
CMake Error at src/cmake_install.cmake:103 (file):
  file INSTALL cannot copy file
  "/home/mcuee/build/avr/avrdude/build_linux/src/_swig_avrdude.so" to
  "/usr/local/lib/python3.12/dist-packages/_swig_avrdude.so": Permission
  denied.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)


gmake: *** [Makefile:100: install] Error 1

@ndim
Copy link
Contributor

ndim commented Sep 1, 2024

The well known well-known directory problem.

@ndim
Copy link
Contributor

ndim commented Sep 10, 2024

Interestingly, the AX_* macros for Automake builds provide directory definitions which install python code to whatever --prefix you give it (PR coming in a few days).

@ndim
Copy link
Contributor

ndim commented Sep 10, 2024

Oh, and as the whole installation and the startup which finds the installed files etc is a bit unusual, we might be able to do something about working with a non-well-known install dir. Some changes to the cmake code will be required.

@leventelist
Copy link
Author

@ndim The patch I included?

@ndim
Copy link
Contributor

ndim commented Sep 11, 2024

@leventelist I was thinking more along the lines of installing to /home/user/my-avr-toolset-root prefix and avrdude ending up in /home/user/my-avr-toolset-root/bin and the python stuff in /home/user/my-avr-toolset-root/lib/python3.12/site-packages, without needing to give any extra arguments to cmake.

Then we just need to install a correctly adapted avrdude-gui script which adds the proper path to PYTHONPATH.

@mcuee
Copy link
Collaborator

mcuee commented Sep 11, 2024

BTW, mostly Windows users using MSVC has to manually install the Python extension. I tend to believe it is the same for macOS Homebrew users.

Homebrew avrdude formula does not enable Swig/Python at all. In fact, it is even missing libserialport support.
https://github.com/Homebrew/homebrew-core/blob/ca85cae75ef9d3e0446b594f1e80bd2998da28ec/Formula/a/avrdude.rb

@mcuee
Copy link
Collaborator

mcuee commented Sep 27, 2024

Swig and Python detection may also need to be improved.

The following is from my Mac Mini M1 running the latest macOS 15.0 and Homebrew. It detects the wrong default Python installation.

My /usr/local is mainly for x86_64 version of Homebrew.

avrdude_test/avrdude_main - (main)> which python3
/opt/homebrew/bin/python3

avrdude_test/avrdude_main - (main)> which swig
/opt/homebrew/bin/swig

avrdude_test/avrdude_main - (main)> brew --prefix
/opt/homebrew

avrdude_test/avrdude_main - (main)> ./build.sh 
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.46.2")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Looking for libelf.h
-- Looking for libelf.h - not found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.2.1", minimum required is "4.0") found components: python
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found version "3.12.6") found components: Interpreter Development Development.Module Development.Embed
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
  -- DISABLED   linuxgpio
  -- DISABLED   linuxspi
  -- DO HAVE    swig+Python3
  -- ----------------------
  -- Configuring done (3.0s)
  -- Generating done (0.0s)
  -- Build files have been written to: /Users/mcuee/build/avr/avrdude_test/avrdude_main/build_darwin
  

@mcuee mcuee changed the title Installing v8.0 avrdude Python binding configuration improvement Sep 27, 2024
@ndim
Copy link
Contributor

ndim commented Sep 27, 2024

I may have found a fix for that already. I need to look it up tomorrow.

@leventelist
Copy link
Author

leventelist commented Sep 27, 2024 via email

@ndim
Copy link
Contributor

ndim commented Sep 27, 2024

@mcuee This did the trick for my "finding the wrong python" issues on Fedora 40: 2e7a620 (part of my improve-autotools-build-3 branch which is not a PR yet).

 # Find SWIG
 find_package(SWIG 4.0 COMPONENTS python)
 if(SWIG_FOUND)
+  # https://discourse.cmake.org/t/find-package-python3-is-not-finding-the-correct-python/10563/8
+  set(Python3_FIND_STRATEGY LOCATION)
+  set(Python3_FIND_UNVERSIONED_NAMES FIRST)
   find_package(Python3 COMPONENTS Interpreter Development)
   if(PYTHON3_FOUND)
     set(HAVE_SWIG 1)

It might help with your issues as well. If it does, it should be considered for general use.

@mcuee
Copy link
Collaborator

mcuee commented Sep 30, 2024

@ndim

Unfortunately it does not work.

avr/avrdude_test > git clone https://github.com/ndim/avrdude.git avrdude_ndim
Cloning into 'avrdude_ndim'...
remote: Enumerating objects: 26637, done.
remote: Counting objects: 100% (283/283), done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 26637 (delta 178), reused 246 (delta 151), pack-reused 26354 (from 1)
Receiving objects: 100% (26637/26637), 16.14 MiB | 14.56 MiB/s, done.
Resolving deltas: 100% (19564/19564), done.

avr/avrdude_test > cd avrdude_ndim 

avrdude_test/avrdude_ndim - (main)> git checkout improve-autotools-build-part-3
branch 'improve-autotools-build-part-3' set up to track 'origin/improve-autotools-build-part-3'.
Switched to a new branch 'improve-autotools-build-part-3'
avrdude_test/avrdude_ndim - (improve-autotools-build-part-3)> which python3
/opt/homebrew/bin/python3

avrdude_test/avrdude_ndim - (improve-autotools-build-part-3)> ./build.sh 
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.46.2")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Looking for libelf.h
-- Looking for libelf.h - not found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.2.1", minimum required is "4.0") found components: python
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.12/bin/python3 (found version "3.12.6") found components: Interpreter Development Development.Module Development.Embed
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
-- DISABLED   linuxgpio
-- DISABLED   linuxspi
-- DO HAVE    swig+Python3
-- ----------------------
-- Configuring done (2.7s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/mcuee/build/avr/avrdude_test/avrdude_ndim/build_darwin

@mcuee
Copy link
Collaborator

mcuee commented Sep 30, 2024

BTW, the Python detection problem under macOS also affect Homebrew formula if you want to build git main. The issue is a bit strange though.

avr/avrdude_test > brew info avrdude
==> avrdude: stable 8.0 (bottled), HEAD
Atmel AVR MCU programmer
https://www.nongnu.org/avrdude/
Installed
/opt/homebrew/Cellar/avrdude/8.0 (17 files, 7.9MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-09-30 at 09:55:17
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/a/avrdude.rb
License: GPL-2.0-or-later
==> Dependencies
Build: cmake ✔, libelf ✔
Required: hidapi ✔, libftdi ✔, libusb ✔, libusb-compat ✔
==> Options
--HEAD
	Install HEAD version
==> Analytics
install: 1,927 (30 days), 3,965 (90 days), 13,746 (365 days)
install-on-request: 1,401 (30 days), 2,773 (90 days), 9,939 (365 days)
build-error: 12 (30 days)

avr/avrdude_test > brew install avrdude --HEAD
Error: avrdude 8.0 is already installed
To install HEAD, first run:
  brew unlink avrdude

avr/avrdude_test > brew unlink avrdude
Unlinking /opt/homebrew/Cellar/avrdude/8.0... 9 symlinks removed.

avr/avrdude_test > brew install avrdude --HEAD
==> Fetching avrdude
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/d62ffb4ee3a71118b23ba26265fe0b6aa6aef958/Formula/a/avrdude.
############################################################################################################################# 100.0%
==> Cloning https://github.com/avrdudes/avrdude.git
Updating /Users/mcuee/Library/Caches/Homebrew/avrdude--git
==> Checking out branch main
Already on 'main'
Your branch is up to date with 'origin/main'.
HEAD is now at 30e19f23 Update NEWS
==> cmake -S . -B build/shared -DCMAKE_INSTALL_SYSCONFDIR=/opt/homebrew/etc -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_RPATH=@loader_pat
==> cmake --build build/shared
==> cmake --install build/shared
Last 15 lines from /Users/mcuee/Library/Logs/Homebrew/avrdude/03.cmake:
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-30e19f2/lib/libavrdude.dylib
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-30e19f2/include/libavrdude.h
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-30e19f2/include/libavrdude-avrintel.h
-- Installing: /opt/homebrew/etc/avrdude.conf
-- Installing: /opt/homebrew/Cellar/avrdude/HEAD-30e19f2/share/man/man1/avrdude.1
-- Installing: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/_swig_avrdude.so
CMake Error at build/shared/src/cmake_install.cmake:119 (file):
  file INSTALL cannot copy file
  "/tmp/avrdude-20240930-18134-w43kkv/build/shared/src/_swig_avrdude.so" to
  "/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/_swig_avrdude.so":
  Operation not permitted.
Call Stack (most recent call first):
  build/shared/cmake_install.cmake:42 (include)



READ THIS: https://docs.brew.sh/Troubleshooting

avrdude's formula was built from an unstable upstream --HEAD.
This build failure is expected behaviour.
Do not create issues about this on Homebrew's GitHub repositories.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

avr/avrdude_test > brew link avrdude        
Linking /opt/homebrew/Cellar/avrdude/8.0... 9 symlinks created.

@mcuee
Copy link
Collaborator

mcuee commented Sep 30, 2024

@ndim
With Python Virtual Environment, it seems to work.

(py312venv) mcuee@Macmini avrdude_test/avrdude_ndim  - (improve-autotools-build-part-3)> which python
/Users/mcuee/build/python/py312venv/bin/python

(py312venv) mcuee@Macmini avrdude_test/avrdude_ndim  - (improve-autotools-build-part-3)> which swig
/opt/homebrew/bin/swig

(py312venv) mcuee@Macmini avrdude_test/avrdude_ndim  - (improve-autotools-build-part-3)> ./build.sh 
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.46.2")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Looking for libelf.h
-- Looking for libelf.h - not found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.2.1", minimum required is "4.0") found components: python
-- Found Python3: /Users/mcuee/build/python/py312venv/bin/python3 (found version "3.12.6") found components: Interpreter Development Development.Module Development.Embed
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
-- DISABLED   linuxgpio
-- DISABLED   linuxspi
-- DO HAVE    swig+Python3
-- ----------------------
-- Configuring done (1.8s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/mcuee/build/avr/avrdude_test/avrdude_ndim/build_darwin

@mcuee
Copy link
Collaborator

mcuee commented Sep 30, 2024

@ndim

I think your change is useful for Python Virtual Environment. git main does not work but your branch works fine.


(py310venv) mcuee@Macmini avrdude_test/avrdude_ndim  - (improve-autotools-build-part-3)> which python3
/Users/mcuee/build/python/py310venv/bin/python3

(py310venv) mcuee@Macmini avrdude_test/avrdude_ndim  - (improve-autotools-build-part-3)> which python 
/Users/mcuee/build/python/py310venv/bin/python

(py310venv) mcuee@Macmini avrdude_test/avrdude_ndim  - (improve-autotools-build-part-3)> ./build.sh 
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.46.2")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Looking for libelf.h
-- Looking for libelf.h - not found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.2.1", minimum required is "4.0") found components: python
-- Found Python3: /Users/mcuee/build/python/py310venv/bin/python3 (found version "3.10.15") found components: Interpreter Development Development.Module Development.Embed
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
-- DISABLED   linuxgpio
-- DISABLED   linuxspi
-- DO HAVE    swig+Python3
-- ----------------------
-- Configuring done (1.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/mcuee/build/avr/avrdude_test/avrdude_ndim/build_darwin

git main will fail.

(py310venv) mcuee@Macmini avrdude_test/avrdude_main  - (main)> ./build.sh 
-- The C compiler identification is AppleClang 16.0.0.16000026
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Git: /opt/homebrew/bin/git (found version "2.46.2")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "2.3")
-- Looking for libelf.h
-- Looking for libelf.h - not found
-- Looking for libelf/libelf.h
-- Looking for libelf/libelf.h - found
-- Looking for usb.h
-- Looking for usb.h - found
-- Looking for lusb0_usb.h
-- Looking for lusb0_usb.h - not found
-- Looking for libusb.h
-- Looking for libusb.h - not found
-- Looking for libusb-1.0/libusb.h
-- Looking for libusb-1.0/libusb.h - found
-- Looking for hidapi/hidapi.h
-- Looking for hidapi/hidapi.h - found
-- Looking for ftdi_tcioflush
-- Looking for ftdi_tcioflush - found
-- Found SWIG: /opt/homebrew/bin/swig (found suitable version "4.2.1", minimum required is "4.0") found components: python
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found version "3.12.6") found components: Interpreter Development Development.Module Development.Embed
-- Configuration summary:
-- ----------------------
-- DO HAVE    libelf
-- DO HAVE    libusb
-- DO HAVE    libusb_1_0
-- DO HAVE    libhidapi
-- DON'T HAVE libftdi
-- DO HAVE    libftdi1
-- DO HAVE    libreadline
-- DO HAVE    libserialport
-- DISABLED   doc
-- DISABLED   parport
-- DISABLED   linuxgpio
-- DISABLED   linuxspi
-- DO HAVE    swig+Python3
-- ----------------------
-- Configuring done (2.9s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/mcuee/build/avr/avrdude_test/avrdude_main/build_darwin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants