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

Unable to build on ubuntu #698

Closed
protodmorgan opened this issue Mar 28, 2018 · 21 comments
Closed

Unable to build on ubuntu #698

protodmorgan opened this issue Mar 28, 2018 · 21 comments

Comments

@protodmorgan
Copy link

I'm attempting to install this on ubuntu. However, it seem I am missing something. when I follow the instructions make release. I am hitting the following error:

[RELEASE]
make[1]: *** No targets specified and no makefile found. Stop.
Makefile:27: recipe for target 'release' failed
make: *** [release] Error 2

@xor-gate
Copy link
Member

You should run make clean because CMake didn't generated any makefiles. Make sure you have installed cmake libusb-dev or else it wont build.

@protodmorgan
Copy link
Author

results in the same issue.

sudo apt-get install cmake libusb-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libusb-dev is already the newest version (2:0.1.12-28).
cmake is already the newest version (3.5.1-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 108 not upgraded.

@DESKTOP-SLOJ0HQ:~/stlink$ make
[RELEASE]
make[1]: *** No targets specified and no makefile found. Stop.
Makefile:27: recipe for target 'release' failed
make: *** [release] Error 2

@slyshykO
Copy link
Collaborator

slyshykO commented Mar 28, 2018 via email

@protodmorgan
Copy link
Author

You should install libusb-1.0-dev( not sure that is correct name) but pack
may contain libusb-1.0

even with that installed Same issue

@slyshykO
Copy link
Collaborator

slyshykO commented Mar 28, 2018 via email

@xor-gate
Copy link
Member

xor-gate commented Mar 28, 2018

You need to make sure the build folder is removed when the cmake run failed which make clean does. See https://github.com/texane/stlink/blob/master/doc/compiling.md. The makefile only creates a folders and executes cmake to generate makefiles. Then make is executed to run the build. The error message is due to cmake didn't had generated any makefiles (https://github.com/texane/stlink/blob/master/Makefile#L41-L43). Error was: make[1]: *** No targets specified and no makefile found. Stop.

@slyshykO
Copy link
Collaborator

I successfully build the stlink following instruction.
And also in Orange Pi Zero, that relies on #621 .

@protodmorgan
Copy link
Author

thanks..as I said I was probably missing something. trying to learn.

@protodmorgan
Copy link
Author

Seem to run into a problem now after compiling, I am running st-info etc, and I get. st-info: error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory

can confirm those libs exist but are in lib/lib, and I did run ldconfig

@jjmilburn
Copy link

jjmilburn commented Feb 7, 2019

Running ldconfig did not resolve this for me. I had to first manually copy the files libstlink.so.1 / libstlink.so to /usr/local/lib/. Only then did ldconfig make any difference.

@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.6.1 Feb 19, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Feb 21, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, Feedback required Feb 21, 2020
@Basilisvirus
Copy link

Happened to me when i downloaded Source code (tar.gz).

Then, i downloaded Source code (zip) and it worked.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 13, 2020

@Basilisvirus: Interesting. Nevertheless both archive files .zip and .tar.gz. are generated automatically by github. Both hold the same content. Are there any local problems with unzipping .tar.gz or directory paths? Was your download complete?

@Basilisvirus
Copy link

@Nightwalker-87 Thats what i am thinking. Maybe my download was not completed/corrupted or there was an unzip error.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 13, 2020

Could you or anyone else with ubuntu retry the .tar.gz archive to verify, so that we can finally resolve this issue with the knowledge that both work correctly? That would be great. Unfortunately I don't have the possibility to test this with an ubuntu system.

@Basilisvirus
Copy link

I would, but right now i get issue #478 error so let me fix that first xD

@Nightwalker-87
Copy link
Member

ok, of course we welcome any helpful contribution. 👍

@Basilisvirus
Copy link

Basilisvirus commented Mar 13, 2020

I re-installed the release 1.6.0, using the Source code (tar.gz) and it installed correctly, so there is no issue here.
Plus, i installed it using sudo make instead of make and all my other installation-based problems were solved as well.

So i think we can close this issue?
The solution was: try again to download and extract the file.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 13, 2020

Yes we can! 👍 🥇
@Basilisvirus: Thank you for your help - very appreciated!

@Nightwalker-87 Nightwalker-87 removed this from the Feedback required milestone Mar 13, 2020
@Nightwalker-87
Copy link
Member

Running ldconfig did not resolve this for me. I had to first manually copy the files libstlink.so.1 / libstlink.so to /usr/local/lib/. Only then did ldconfig make any difference.

@slyshykO: Was this fixed in PR 701? Could you have a look at this?

@slyshykO
Copy link
Collaborator

@Nightwalker-87 #701 not about this issue.

@Nightwalker-87
Copy link
Member

Final review of this issue:

  1. make[1]: *** No targets specified and no makefile found. Stop.
    --> Solution: Unable to build on ubuntu #698 (comment)
  2. st-info: error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory
    --> Solution: Unable to build on ubuntu #698 (comment)

As there are no remaining open points to address, this issue is now finally closed.

@Nightwalker-87 Nightwalker-87 removed their assignment Jun 13, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants