Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: Compiler error: can't find {library_name}.a file

Hybrid View

  1. #1
    Senior Member
    Join Date
    Nov 2012
    Location
    Salt Lake City, UT, USA
    Posts
    269

    Compiler error: can't find {library_name}.a file

    Hi everyone, had my head down for several months getting a commercial control system using Teensy 3.2 into production and shipping across the US. There are now almost 1000 installations and users love it! So that is good news: happy customers. We are also managing production and right now tariffs and jellybean parts allocations make this extra challenging...

    Anyway I am using Arduino 1.8.4 and TD 1.39 (tried older 1.8.2 and TD 1.36 versions too) and trying to get the TE Weathershield working with a Teensy 3.1 or 3.2 in a SparkFun Teensy shield using i2c_t3. The code compiles OK with an Arduino as the target but when I select Teensy 3.1/3.2 it throws an error I have never seen before about not finding the {libraryname}.a file in the temporary build tree.

    Code:
    c:\arduino-1.8.4\hardware\tools\arm\bin\../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ar.exe: C:\Users\Bruce\AppData\Local\Temp\arduino_build_872959/core/TEWeatherShield.a: No such file or directory
    I've googled around a bit and am not sure where to start trying to fix this, or what it is all about.

    The example programs for one of the sensors on this TE board build OK; it is only when building the whole tamale with all the libraries included as well as the library for the Weathershield itself that this odd error appears. Changing optimization has no effect. Changing to Teensy 3.5 no effect.

    My next move will be to try the lastest stable version of TeensyDuino.

    There's nothing really odd about the WeatherShield library.

    When I get this working I will post an update. Here is the main GitHub link
    Last edited by bboyes; 04-06-2019 at 06:35 PM. Reason: add github

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,805
    Pulled it down - unzipped - moved TWw... to libraries and opened Demo to Compile:

    T:\tCode\libraries\TE_WeatherShield/TEWeatherShield.h:7:20: fatal error: htu21d.h: No such file or directory

  3. #3
    Senior Member
    Join Date
    Nov 2012
    Location
    Salt Lake City, UT, USA
    Posts
    269

    Weathershield compiles with Ard 1.8.8 and TD 1.45

    Quote Originally Posted by defragster View Post
    Pulled it down - unzipped - moved TWw... to libraries and opened Demo to Compile:
    Thanks for the quick response. Yeah you also need a library for each sensor on the board (links further down on the page at GH, but you will want our modified version to use i2c_t3). So it's a bit of an ordeal. I'm in midst of making mods to #include <i2c_t3.h> if it is a Teensy, otherwise #include <Wire.h> I will push some changes today once I get the WeatherShield MUX working right.

    I just loaded Arduino 1.8.8 and TD 1.45 and it loads and runs on the board, but it can't reach all the sensors so the MUX they use seems not to be getting controlled properly. But at least it is building. I want to use this board in a remote site where we are currently logging in search of destructive electrical events... long story. I'm curious if there is correlation between weather and the electrical events.

    This makes me wish there was a simple way to just use make files and avoid the whole Arduino IDE. Was something just announced not long ago about a CLI for Arduino? Like I mentioned had my head down dealing with a host of practical production problems.

    These boards for under $35 are a pretty good deal. Just the TSD305 thermopile array is $15 singles. It seems a nice sensor for large area non-contact sensing. At distance X from the surface to be measured, the FWHM radius being sensed is also X, so that's a lot of area integration. But it would be good for sensing temp of floors or walls and ceiling to determine air stratification. It senses 5 um and longer, so windows are opaque and you sense the actual temperature of the glass. It depends on the emissivity of the surface being sensed, of course. Just now my floor is 24.3C, ceiling 23.1C and window 23.0C so you can guess we have radiant floor heat. TMI probably...

    Back to the compiler error: what's the story with the *.a files as some intermediate compilation step? I googled and didn't find much specific, just things like https://github.com/arduino/Arduino/wiki/Build-Process

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    Quote Originally Posted by bboyes View Post
    Was something just announced not long ago about a CLI for Arduino?
    I can tell you Teensy does not yet support the no-Java CLI stuff. We're waiting on this essential feature.

    https://github.com/arduino/arduino-cli/pull/109

    Fortunately, this feature was just recently published for the first time in a non-beta release in Arduino 1.8.9, so progress is being made. Slowly...

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,805
    @bboyes are you on windows? FrankB made a CmdLine batch file to execute the Arduino build that I am using to compile in my editor {with some mods of a batch file to set Board & Build }. It needs a complete standard Arduino tree w/ Teensyduino - but kicking off Compile.cmd results in TyCommander upload to chosen Teensy.

    Not sure how Makefile would be different as all the needed source files still need to be in place and findable.

    In my TEMP% I find a single "*.a" core.a that is the core library precompiled - only built once per session, or on change to core files or build/device params.

    May be something out of sync in the install?

  6. #6
    Senior Member
    Join Date
    Nov 2012
    Location
    Salt Lake City, UT, USA
    Posts
    269
    Quote Originally Posted by defragster View Post
    @bboyes are you on windows? FrankB made a CmdLine batch file to execute the Arduino build that I am using to compile in my editor {with some mods of a batch file to set Board & Build }. It needs a complete standard Arduino tree w/ Teensyduino - but kicking off Compile.cmd results in TyCommander upload to chosen Teensy.

    Not sure how Makefile would be different as all the needed source files still need to be in place and findable.

    In my TEMP% I find a single "*.a" core.a that is the core library precompiled - only built once per session, or on change to core files or build/device params.

    May be something out of sync in the install?
    Windows 10 in this case and Linux (Ubuntu 18.04) also. Right now my travel machine is a Windows Thinkpad so that's what I was using.

    Well, it works on A 1.8.8 and TD 1.45 so maybe something with older versions? Not sure why that would matter. I need to understand the build process and see some intermediate files to figure this out. Back in the Bad Old Days of Make or Ant (Java) that's what we did and it worked well. If a build failed you knew where and why. Arduino hides way too much of that even with verbose turned on. Linux keeps some more intermediate files.

    Now I am chasing a number of bugs both minor and major to get this board working properly with Teensy. I may try with an Arduino Uno to see if it even works with that. It's always a bit astonishing when a major vendor like TE releases sample code that has a lot of typos and also doesn't even work reliably. It's not valued I guess... so get an intern to do it and move on to the next thing.

    In this case the individual sensor libraries won't work on the WeatherShield board since it has a klunky MUX which has to be manipulated (not a proper I2C MUX like TCA9548A, just a 74HC4052) and those libraries don't include that. So that's the first thing I'm fixing to be sure each individual sensor works. Etc...

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,805
    Quote Originally Posted by bboyes View Post
    Windows 10 in this case and Linux (Ubuntu 18.04) also. Right now my travel machine is a Windows Thinkpad so that's what I was using.
    ...
    In windows '%appdata%' temp local user storage is everything left from IDE build - I've not had IDE in regular use since I started with FrankB's Compile.cmd! In that case the .CMD file points with a %temp% to a folder on my SSD. In both cases EVERTHING used in building is THERE - as it is used on the next rebuild.

    Your install may have gotten confused or corrupted - or may have hit a now fixed error condition in the build.

    The Compile.Cmd just uses MsDos Batch file command to execute a complete CmdLine build of the Arduino Tree in full - using it as MAKE with the Standard IDE Byte for Byte comparable .HEX.

    It seems a Linux shell guru should be able to replicate the core line in the Compile.Cmd and ideally generate the same from there. In conjuction with TyCommander for Upload and SerMon it makes the dev setup very nice with my chosen editor.

  8. #8
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    441
    This makes me wish there was a simple way to just use make files and avoid the whole Arduino IDE.
    Have a look at VisualTeensy https://github.com/luni64/VisualTeensy. It generates purely makefile based Teensy projects for VisualCode (Win10). For a quick start you can point it at your standard Arduino installation and it will use the files from there. In expert mode you don't need to use Arduino at all. Just download the Teensyduino core from Pauls GitHub and gcc (e.g. from here https://launchpad.net/gcc-arm-embedded/+download).
    The nice thing is that you can generate a fully self contained project with no "outside" dependencies. It will compile as long as you have 'make' and gcc on your system.

    The "documentation" is not quite up to date but usage is self explaining I hope.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,805
    Indeed VisualTeensy looks good - I tested it at the start and a bit after … but FrankB's solution worked so well with and to extend my existing Windows only workflow doing batch board build with github.com... Tset was personal best fit.

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,171
    Another option might look like putting a copy of the Arduino IDE into "portable mode".

    https://www.arduino.cc/en/Guide/PortableIDE

    This really only works with the Windows ZIP download and Linux. So if you have Arduino from the installer, get the ZIP file. If you're using Macintosh then I'm afraid this isn't an option.

    Teensyduino is already designed to install everything inside a copy of Arduino. But by default, Arduino puts libs and stuff you install in other places. Portable mode causes a copy of Arduino to store absolutely everything inside itself.

    If you're going to put a little work into sorting this mess of extra libraries, might be worthwhile to first set up a copy of Arduino 1.8.8 and configure portable mode. Then install Teensyduino. Then install those libraries. Edit them if needed. You'll notice the pathnames will all be inside that copy of Arduino.

    When you get it all working again, make backup copies of that Arduino folder. Because it's in portable mode, you can just back up that single Arduino folder and get a complete capture of everything, without dependency on other locations. When you copy it to a different computer (with the same OS) it should run exactly the same, even if that machine has other copies of Arduino with different stuff installed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •