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

Can't link basic blink #379

Closed
ericmnel opened this issue Oct 29, 2015 · 16 comments
Closed

Can't link basic blink #379

ericmnel opened this issue Oct 29, 2015 · 16 comments

Comments

@ericmnel
Copy link

Obviously I messed up the install somehow:

18:20:25 **** Incremental Build of configuration Sming for project Basic_Blink ****
make all
LD out/build/app.out
/opt/esp-open-sdk/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lsming
collect2: error: ld returned 1 exit status
make: *** [out/build/app.out] Error 1

18:20:25 Build Finished (took 91ms)

Any pointers on how I can get esp-open-sdk to notice the Sming library appreciated. The only way I knowingly deviated from the process was to put Spiffy in /usr/local/bin instead of /usr/bin since it was also in my path and my admin user couldn't write to /usr/bin.

@ericmnel
Copy link
Author

One other deviation - I didn't install Eclipse the way suggested in the notes, but rather via the Eclipse website (the C++ version) since that seemed to put Eclipse under /Applications instead of caskroom.

@raburton
Copy link
Member

Did you build libsming? This is no longer supplied pre-compiled. Spiffy is also now included in Sming, but also needs to be compiled, and should not need to be put anywhere other than where it is compiled.

@ericmnel
Copy link
Author

Thanks! That got me a lot further.

09:10:08 **** Incremental Build of configuration Sming for project Basic_Blink ****
make all
C+ app/application.cpp
AR out/build/app_app.a
LD out/build/app.out

...

Traceback (most recent call last):
File "/opt/esp-open-sdk/esptool/esptool.py", line 22, in
import serial
ImportError: No module named serial
make: *** [out/build/app.out] Error 1

09:10:09 Build Finished (took 1s.872ms)

Is there another thing I need to recompile to get the serial module?

@ericmnel
Copy link
Author

Also, does this mean that the separate version of Spiffy that is supposed to go in /usr/bin (that I put in /usr/local/bin) can be deleted?

@ericmnel
Copy link
Author

At some point I'd like to make some major changes to the Mac startup README, but I'll wait until I have more experience with the toolset.

@raburton
Copy link
Member

Also, does this mean that the separate version of Spiffy that is supposed to go in /usr/bin (that I put in /usr/local/bin) can be deleted?

Yes, you shouldn't use a separate version any more as it might not be compatible. The version that is included with sming is built from the same code as the spiffs support in libsming so it should always be the right version. The makefiles now, by default, will look for the sming version of spiffy in its build location. You can build it with the eclipse target or by running make spiffy in the sming/sming dir.

@AutomationD
Copy link
Contributor

What do you think is missing? I'll make changes.

Sent from my iPhone

On Oct 29, 2015, at 6:44 PM, Eric Nelson notifications@github.com wrote:

At some point I'd like to make some major changes to the Mac startup README, but I'll wait until I have more experience with the toolset.


Reply to this email directly or view it on GitHub.

@ericmnel
Copy link
Author

  • Delete section about Xcode having to be 6.2, it worked fine with 7.1
  • Change the Eclipse section to have people install with the official installer and put it in /Applications, the place that brew puts Eclipse does not match up with the stuff in the "configure Environment variables" section
  • The "install prebuilt ESP Open SDK" section did't work for me without additional commands

cd /opt
sudo mkdir esp-open-sdk
sudo mv esp* esp-open-sdk
sudo mv xten* esp-open-sdk
sudo mv sdk esp-open-sdk

  • The "Get Sming core" needs to be something like:

cd
sudo git clone https://github.com/anakod/Sming.git
cd Sming/Sming
sudo make
sudo make spiffy
cd ../..
sudo cp Sming /opt

  • Add a warning to the "Configure Environment Variables" section that if they do it from a non-administrator account it will silently fail to add the entries to the file.
  • Remove the install Spiffy section
  • Change the "Get Sming Examples" section - they can import the git repo directly from Eclipse without using "git clone" from a terminal.
  • Whatever the fix is for my "import serial" linker error above turns out to be.

Thanks! Eric

@raburton
Copy link
Member

shouldn't need to run make as root

@ericmnel
Copy link
Author

You don't need to be root, just logged in as an administrator rather than a regular user. Administrators have fewer privileges, it is a click box in the user creation system preference panel.

I think my linker problem may be due to an old python install, I'm going to follow this advice:

https://wolfpaulus.com/journal/mac/installing_python_osx/

Some other guy fixed the linker problem by updating python, I'll try that - it looks like a pain because Apple has marked python as "restricted" and you need to boot into recovery mode to change it even as root.

@AutomationD
Copy link
Contributor

@ericmnel normally you would use homebrew to install python that differs from your system one.

@ericmnel ericmnel reopened this Oct 29, 2015
@ericmnel
Copy link
Author

Is that somewhere in the "build it yourself" instructions for ESP Open SDK? I used the pre-built install.
Probably good to add that to the README also.

@AutomationD
Copy link
Contributor

@ericmnel this is normal practice to use homebrew. If you feel that your python is messed up, try doing brew install python.

@Picatek
Copy link

Picatek commented Nov 2, 2015

I have the same original problem see below:
However I did build libsming as sugested :

This is from the build of the SmingFramework
........
AR out/build/app_app.a
Installing libsming
Done

It is a fresh, error free sming installation from today(2015-11-02)
What am I missing?

The error building Basic_Blink:

13:06:46 Build Finished (took 31s.240ms)
13:12:25 **** Build of configuration Sming for project Basic_Blink ****
make all
LD out/build/app.out
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.1.0/../../../../xtensa-lx106-elf/bin/ld.exe: cannot find -lsming
collect2.exe: error: ld returned 1 exit status
make: *** [out/build/app.out] Error 1

@hreintke
Copy link
Contributor

hreintke commented Nov 2, 2015

@Picatek :
Did you set your environment variables ESP_HOME and SMING_HOME ?

@icodk
Copy link

icodk commented Nov 30, 2015

Thanks for your answer and sorry for the delay. I went on vacation.
Yes:
echo %ESP_HOME%
c:\Espressif
echo %SMING_HOME%
C:\tools\sming\Sming

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

No branches or pull requests

6 participants