Skip to content

Unable to use library directory on Windows #280

Closed
@jgfoster

Description

@jgfoster

On one of my student's Windows machine we find the following:

Bundled gems are installed into `./vendor/bundle`
                           .                  __  ___
                   _, ,_  _| , . * ._   _    /  `  |
                  (_| [ `(_] (_| | [ ) (_)   \__. _|_   v1.3.0

 

Host OS...                                                               windows
Located arduino-cli binary...                     C:\Users\calvo/arduino-cli.exe
Found libraries directory...          C:\Users\calvo\Documents\Arduino/libraries
Environment variable CUSTOM_INIT_SCRIPT...                                    ''
Environment variable USE_SUBDIR...                                            ''
Installing library under test...                                               ✗
This may indicate a problem with your configuration; halting here
Failures: 1
========== Last backend command (if relevant):
There is already a library 'Adafruit BusIO' in the library directory (C:\Users\calvo\Documents\Arduino/libraries/Adafruit_BusIO).  It may need to be removed manually.

Here is the directory on Windows:

$ ls -al C:/Users/calvo/Documents/Arduino/libraries
total 37
drwxr-xr-x 1 calvo 197609  0 Feb  2 13:40 .
drwxr-xr-x 1 calvo 197609  0 Feb  2 13:36 ..
drwxr-xr-x 1 calvo 197609  0 Feb  2 16:08 Adafruit_BusIO
drwxr-xr-x 1 calvo 197609  0 Feb  2 13:19 Adafruit_MAX31865
drwxr-xr-x 1 calvo 197609  0 Jan 24 20:51 Ethernet
drwxr-xr-x 1 calvo 197609  0 Nov 26 17:07 LiquidCrystal
-rw-r--r-- 1 calvo 197609 87 Oct 11 17:01 readme.txt
drwxr-xr-x 1 calvo 197609  0 Jan 24 16:41 RTClib
drwxr-xr-x 1 calvo 197609  0 Jan 28 17:15 TankControllerLib
drwxr-xr-x 1 calvo 197609  0 Oct 11 17:02 USBHost

On my macOS machine we find the following:

                           .                  __  ___
                   _, ,_  _| , . * ._   _    /  `  | 
                  (_| [ `(_] (_| | [ ) (_)   \__. _|_   v1.3.0

Host OS...                                                                   osx
Located arduino-cli binary...                         /Users/jfoster/arduino-cli
Found libraries directory...          /Users/jfoster/Documents/Arduino/libraries
Environment variable CUSTOM_INIT_SCRIPT...                                    ''
Environment variable USE_SUBDIR...                                            ''
Installing library under test...                                               ✓
WARNING... Installed library named 'Adafruit BusIO' has directory name 'Adafruit_BusIO'
Library installed at... /Users/jfoster/Documents/Arduino/libraries/Adafruit_BusIO

================================================================================
Beginning the next phase of testing...                              Unit testing
The set of compilers (1) isn't empty...                                        ✓
Checking g++ version... 
    Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
    Apple clang version 12.0.0 (clang-1200.0.32.29)
    Target: x86_64-apple-darwin19.6.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
...Checking g++ version                                                        ✓
libasan availability for g++...                                             true
Library conforms to Arduino library specification...                         1.5
Wildcard architecture in library.properties, using configured platforms... 
    mega2560
...Wildcard architecture in library.properties, using configured platforms      

Unit testing test.cpp with g++ for mega2560... 

Here is the directory on macOS:

jfoster@ljs Adafruit_BusIO % ll /Users/jfoster/Documents/Arduino/libraries
total 24
drwxr-xr-x@ 12 jfoster  staff   384 Feb  2 16:12 ./
drwxr-xr-x@  4 jfoster  staff   128 Jan 12 10:32 ../
-rw-r--r--@  1 jfoster  staff  6148 Feb  2 16:12 .DS_Store
drwxr-xr-x  19 jfoster  staff   608 Feb  2 16:19 Adafruit_BusIO/
drwxr-xr-x@ 22 jfoster  staff   704 Feb  2 12:41 Adafruit_MAX31865/
drwxr-xr-x  18 jfoster  staff   576 Feb  2 13:00 Blink/
drwxr-xr-x   8 jfoster  staff   256 Jan 12 10:13 Ethernet/
drwxr-xr-x  16 jfoster  staff   512 Dec 19 14:48 LiquidCrystal/
drwxr-xr-x  10 jfoster  staff   320 Jan 12 10:13 RTClib/
drwxr-xr-x@ 31 jfoster  staff   992 Jan 18 08:24 TankControllerLib/
drwxr-xr-x  10 jfoster  staff   320 Jan 12 10:13 TinyWireM/
-rw-r--r--   1 jfoster  staff    87 Dec 19 14:50 readme.txt
jfoster@ljs Adafruit_BusIO % 

So, on Windows it says that the library must be removed (an error), while on macOS it says that the library exists (a warning). When we move the working directory out of C:\Users\calvo\Documents\Arduino/libraries then we no longer get that error. Instead we get the following:

Library conforms to Arduino library specification...                         1.0
No tests directory at... C:\Users\calvo\Documents\Arduino/libraries/Adafruit_BusIO/test
Environment variable EXPECT_UNITTESTS is...                          (NilClass)
Skipping unit tests...
  In case that's an error, displaying contents of base directory:

Interestingly, we are running the same version of Arduino-cli (0.13.0), but his environment thinks that the library conforms to specification 1.0 while mine thinks that the library conforms to specification 1.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions