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

Some auto-installed library do not compile, but adding this library manually do the trick #985

Elmaranin opened this Issue Jun 21, 2017 · 1 comment


None yet
2 participants

Elmaranin commented Jun 21, 2017

What kind of issue is this?

  • PlatformIO Core. If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Operating system: linux

PlatformIO Version (platformio --version): 3.3.1, tested on 3.0.4b12 also

Description of problem

Some automatically installed libraries do not compile, but they do compile normally if place them in "lib" dir manually.
My project uses "espressif8266" platform, but I don't think it matters.

Steps to Reproduce

  1. Create empty project, add to environment config: lib_deps =
  2. Get from this library example folder "mqtt_basic.ino" file and place it in platformio project sources dir
  3. Try to run project

Actual Results

error while compiling

Compiling .pioenvs/board/src/mqtt_basic.ino.o
Archiving .pioenvs/board/libFrameworkArduinoVariant.a
sh: 1: Syntax error: "(" unexpected
Indexing .pioenvs/board/libFrameworkArduinoVariant.a

Expected Results

compilation completes with no errors

If problems with PlatformIO Build System:

looks like it is, some logs in "actual results"

The content of platformio.ini:


platform = espressif8266
framework = arduino
board = esp01
lib_deps =
upload_port = /dev/ttyUSB0
targets = upload

Source file to reproduce issue:

#include <ESP8266WiFi.h>
#include <PubSubClient.h>

const char *ssid =	"xxxxxxxx";		// cannot be longer than 32 characters!
const char *pass =	"yyyyyyyy";		//

// Update these with values suitable for your network.
IPAddress server(172, 16, 0, 2);

void callback(const MQTT::Publish& pub) {
  // handle message arrived

WiFiClient wclient;
PubSubClient client(wclient, server);

void setup() {
  // Setup console


void loop() {
  if (WiFi.status() != WL_CONNECTED) {
    Serial.print("Connecting to ");
    WiFi.begin(ssid, pass);

    if (WiFi.waitForConnectResult() != WL_CONNECTED)
    Serial.println("WiFi connected");

  if (WiFi.status() == WL_CONNECTED) {
    if (!client.connected()) {
      if (client.connect("arduinoClient")) {
	client.publish("outTopic","hello world");

    if (client.connected())

Additional info

The main misunderstanding is that if I place the same library to project "lib" directory and remove "lib_deps" from environment config - everything will compiles just great without any errors

@ivankravets ivankravets added the bug label Jun 24, 2017

@ivankravets ivankravets added this to the 3.4.0 milestone Jun 24, 2017


This comment has been minimized.

Show comment
Hide comment

ivankravets Jun 24, 2017


Thanks a lot for a report!


ivankravets commented Jun 24, 2017

Thanks a lot for a report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment