Go Down

Topic: Library can't use both 'src' and 'utility' folders. (Read 16184 times) previous topic - next topic

TheNorm

Anyone seen this? It just started happening. I re-installed but it didn't help. I can't even compile 'blink'.

I'm using 1.6.6

Hillwalker

I'm having the same problem with 1.6.6. I've reinstalled it several times, deleting as much ap data as I could find, but no success.

Basic error message...
----------------------------------------------------------------------
Arduino: 1.6.6 (Windows 10), Board: "Arduino/Genuino Uno"

Library can't use both 'src' and 'utility' folders.

Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
----------------------------------------------------------------------

Verbose error message...
----------------------------------------------------------------------
Arduino: 1.6.6 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files\Arduino\hardware" -tools "C:\Program Files\Arduino\tools-builder" -tools "C:\Program Files\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files\Arduino\libraries" -libraries "C:\Users\Jim\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10606 -build-path "C:\Users\Jim\AppData\Local\Temp\build970dedd6c6de7b8677b769bcbd2d0327.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Jim\AppData\Local\Temp\untitled1485807834.tmp\sketch_nov06a\sketch_nov06a.ino"

Library can't use both 'src' and 'utility' folders.

Error compiling.
----------------------------------------------------------------------

--
Victoria, BC
48 57'N 123 13'W

Hillwalker

OK... Some progress.

The trouble seems to be localized to some of the libraries in the 1.6.6 package. I can eliminate the error is I remove the Ethernet, Robot_Control, SD, TFT, and WiFi libraries.

I'll check and see if I can D/L a separate version of those that works.

--
Victoria, BC
48 57'N 123 13'W

pert

I can eliminate the error is I remove the Ethernet, Robot_Control, SD, TFT, and WiFi libraries.
The error is supposed to be caused when a library has both src and utility folders in the library root folder but the strange thing is that none of those libraries have that issue. Another user reported the same issue was solved by renaming the utility folder in the firmata library here: http://forum.arduino.cc/index.php?topic=357312.msg2464456#msg2464456. The firmata library also doesn't have a src and utility folder in the root folder. So I think it's a bug with the Arduino IDE but on my installation I don't have the issue. If anyone finds more information please report it here so we can try to find the cause and submit an issue report to the developers.

pert

If anyone is having this issue try this:
  • Sketch > Include Library > Manage Libraries...
  • Close
  • You should see a message in the console that looks something like:

Code: [Select]
Invalid library found in C:\Program Files (x86)\arduino-1.6.6\libraries\Ethernet: Library can't use both 'src' and 'utility' folders.
  • Open any example under File > Examples > {library name} where {library name} is the library shown in the error message.
  • Sketch > Show Sketch Folder - this will open the example folder that is inside of the library folder that is causing the issue. Look at the library folder and see if it has a src and utility folder directly under the library folder. If so then move the utility folder into the src folder. If not then you may need to restructure the library, rename the utility folder, or delete the library.


Please report here on what library caused the error message and what the folder structure of the library was so that we can try to track down the solution for this issue. Thanks!

TheNorm

I tried removing the Ethernet, Robot_Control, SD, TFT, and WiFi libraries. Didn't help.

I backed up to build 1.6.5 and still see the message but relating to my sketch folder *after* the compile and it doesn't seem to affect the build. I wasn't actually using the Keypad library and don't know where it might have been referenced. The Keypad library actually had  'src' and 'utility' folders. I removed them and the message went away.


Sketch uses 7,648 bytes (24%) of program storage space. Maximum is 30,720 bytes.
Global variables use 511 bytes (24%) of dynamic memory, leaving 1,537 bytes for local variables. Maximum is 2,048 bytes.
Invalid library found in E:\docs\Arduino\libraries\Keypad: Library can't use both 'src' and 'utility' folders.
Invalid library found in E:\docs\Arduino\libraries\Keypad: Library can't use both 'src' and 'utility' folders.

pert

Where
The Keypad library actually had  'src' and 'utility' folders. I removed them and the message went away.
Where did you download the Keypad library from? I'll see if I can get them to fix it so others don't have this problem.

TheNorm

Library came from DFRobot.

I just re-installed 1.6.6 and did not get the "can't use both 'src' and 'utility' folders".
I did get these warnings after the compile...

Invalid library found in E:\docs\Arduino\libraries\ds1307: E:\docs\Arduino\libraries\ds1307
Invalid library found in E:\docs\Arduino\libraries\LCD1602for_023: E:\docs\Arduino\libraries\LCD1602for_023
Invalid library found in E:\docs\Arduino\libraries\Orangutan: E:\docs\Arduino\libraries\Orangutan
Invalid library found in E:\docs\Arduino\libraries\TimerOne_v9: E:\docs\Arduino\libraries\TimerOne_v9
Invalid library found in E:\docs\Arduino\libraries\ds1307: E:\docs\Arduino\libraries\ds1307
Invalid library found in E:\docs\Arduino\libraries\LCD1602for_023: E:\docs\Arduino\libraries\LCD1602for_023
Invalid library found in E:\docs\Arduino\libraries\Orangutan: E:\docs\Arduino\libraries\Orangutan
Invalid library found in E:\docs\Arduino\libraries\TimerOne_v9: E:\docs\Arduino\libraries\TimerOne_v9

It looks like all of these have 'unconventional' folders in them, not the 'src' & 'utility' folders but others rather than the usual 'examples'. I think the code has gotten very fussy about library folder structure. Too much so if it's rejecting so many libraries that have been in use for a long time.


pert

The only one of those libraries I could find was TimerOne_v9 here. I installed it and didn't get any warnings and the only folder in it is examples. What unconventional folder do you have inside of your copy of that library?

Hillwalker

The error is supposed to be caused when a library has both src and utility folders in the library root folder but the strange thing is that none of those libraries have that issue. Another user reported the same issue was solved by renaming the utility folder in the firmata library here: http://forum.arduino.cc/index.php?topic=357312.msg2464456#msg2464456. The firmata library also doesn't have a src and utility folder in the root folder. So I think it's a bug with the Arduino IDE but on my installation I don't have the issue. If anyone finds more information please report it here so we can try to find the cause and submit an issue report to the developers.
In all the libraries I had to remove, there is an src folder under the root, and a utility folder under the src folder. I can't see that configuration in any of the working libraries.

All of the affected libraries were included with the Windows 32 bit 1.6.6 installer package.

The Firmata library seems to be OK, but I'll check the renaming process and see if it works with the five non-working libraries I've got.

--
Victoria, BC
48 57'N 123 13'W

pert

Thanks for the information Hillwalker. I submitted an issue report to the developers: https://github.com/arduino/arduino-builder/issues/60 and I've added that information to it. Please let me know if anyone finds out anything more.

Hillwalker

OK... Tried renaming the SD>src>utilities directory as suggested and it failed again. I got the same "cannot use src and utility" error message.


If anyone is having this issue try this:
  • Sketch > Include Library > Manage Libraries...
  • Close
  • You should see a message in the console that looks something like:

What console are you refering to? When I close the Manage Libraries dialog box, it simply closes and returns to the IDE. (I'm working on a Windows 10 system, perhaps that's the reason.)

--
Victoria, BC
48 57'N 123 13'W

pert

What console are you refering to?
I mean the window with the black background at the bottom of the IDE that shows compile/upload status/warnings/errors.

Hillwalker

Sorry, I was thinking of something else altogether.

Interesting though. I don't see anything about invalid libraries with, or without a suspect library included. Even with a complete restart between tests.

Curiouser and curiouser...

Thank-you for the help and suggestions. I'll wait and see if anything comes up from your bug report.
--
Victoria, BC
48 57'N 123 13'W

pert

I don't see anything about invalid libraries with, or without a suspect library included. Even with a complete restart between tests.
So you're saying that you get the "Library can't use both 'src' and 'utility' folders." error when you try to verify or upload a sketch but when you open and close Library Manager you don't get any warnings like that?

Go Up