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 install your IPK that has been compiled with non-standard clib(?) #4

Closed
hnyman opened this issue Jan 9, 2017 · 14 comments
Closed

Comments

@hnyman
Copy link

hnyman commented Jan 9, 2017

Your .IPK file can't be installed, as it has been compiled with non-standard options (not with "musl" clib???).

I tested with LEDE but the same goes for Openwrt trunk (as both use musl by default).

root@lede:~# opkg install luci-theme-darkmatter_0.1.77-1_all.ipk
Installing luci-theme-darkmatter (0.1.77-1) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-theme-darkmatter:
 *      libssp *
 * opkg_install_cmd: Cannot install package luci-theme-darkmatter.

Looking in the contents of your IPK, it declares dependency on libssp that is not available with musl.

Package: luci-theme-darkmatter
Version: 0.1.77-1
Depends: libc, libssp

The reason is SSP_SUPPORT config option that gets set by default with non-musl clib:
https://github.com/openwrt/openwrt/blob/master/toolchain/gcc/Config.in#L39

config SSP_SUPPORT
	bool
	prompt "Enable Stack-Smashing Protection support" if TOOLCHAINOPTS
	depends on !USE_MUSL
	default y if !USE_MUSL
	help
Enable Stack-Smashing Protection support
@chron0
Copy link
Member

chron0 commented Jan 9, 2017 via email

@hnyman
Copy link
Author

hnyman commented Jan 9, 2017

It works out-of-the-box with 15.05

CC 15.05 branch uses the old uClibc clib by default. That is the difference. Both Openwrt trunk and LEDE master use musl.

You have developed new stuff for the old branch, to which new functionality is not really added...
(Also "Material" theme is only in Luci master branch, not in for-15.05.)

Ps. I got it installed to my LEDE with
opkg install --force-depends luci-theme-darkmatter_0.1.77-1_all.ipk

The package does not included compiled binaries, so the GCC SSP support is actually non-relevant.

image

@chron0
Copy link
Member

chron0 commented Jan 9, 2017 via email

@hnyman
Copy link
Author

hnyman commented Jan 9, 2017

The Material is compiled from LuCI master by buildbots for both Openwrt trunk and LEDE master using the default musl clib, so no SSP library dependency gets added. (and there is no need to separately remove it...)

So, a theme package compiled with trunk toolchain could be installed to CC15.05, but it does not work vice versa.

After you do some polishing based on the initial feeds from eager users, this could be integrated to the LuCI sources via a PR, so that it would get built automatically for trunk by buildbots.

@chron0
Copy link
Member

chron0 commented Jan 9, 2017

So basically, my task: Adapt and refactor the theme to reflect Makefile and structure of

https://github.com/openwrt/luci/tree/master/themes/luci-theme-material

instead of the original example I've used

https://github.com/LuttyYang/luci-theme-material

and we should be good to go for 15.05 and master/snapshot?

@hnyman
Copy link
Author

hnyman commented Jan 9, 2017

Yep. The LuCI tree is the format needed. Placing the files correctly keeps things clear in the repo and minimises the Makefile contents.

And naturally the theme needs also to be tested on trunk first.

You might notice (and fix?) some feedback that you have already got in the thread in the LEDE forum:
https://forum.lede-project.org/t/openwrt-as-default-web-luci-theme/412/59

Ps. at least for me, your fonts were largely too small on a large screen.

@chron0
Copy link
Member

chron0 commented Jan 10, 2017

@hnyman Could you please test again if deps are resolved (there should be none now) and you are able to install it without forcing?

@hnyman
Copy link
Author

hnyman commented Jan 10, 2017

I downloaded https://apollo.open-resource.org/downloads/luci-theme-darkmatter_0.2-beta-2_all.ipk but it still required --force-depends to install.

root@lede:/tmp# opkg install --force-depends luci-theme-darkmatter_0.2-beta-2_all.ipk
Installing luci-theme-darkmatter (git-17.010.73135-6b9afc1-1) to root...
Configuring luci-theme-darkmatter.
uci: Entry not found
uci: Entry not found
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-theme-darkmatter:
 *      libssp *

Have you compiled that .ipk with Openwrt trunk or LEDE toolchain? (or still with CC15.05 toolchain?)

EDIT: To avoid the libssp dependency, you really need to compile it with Openwrt trunk or LEDE.

@chron0
Copy link
Member

chron0 commented Jan 10, 2017

@hnyman: ah, i c, I've compiled my tests today with trunk but unfortunately I didn't realize that the build has to be done with trunk as well, so I built the last update with 15.05, meh, my bad. I'll run another build in a couple of hours after creating a fresh lede trunk build-env, so that it has been run through 15.05, openwrt trunk and lede trunk to have more confidence.

@chron0
Copy link
Member

chron0 commented Jan 10, 2017

@hnyman OK, beta-2 has been updated with the file coming from the lede trunk build. I could install it in 15.05 without a problem, if you could please try again, whenever it suits you.

@hnyman
Copy link
Author

hnyman commented Jan 10, 2017

It installed just fine into LEDE.

root@lede:/tmp# opkg install luci-theme-darkmatter_0.2-beta-2_all.ipk
Upgrading luci-theme-darkmatter on root from git-17.010.73135-6b9afc1-1 to git-1                                        7.010.73729-fd88e48-1...
Configuring luci-theme-darkmatter.

And yes, you can install that into CC15.05. Like I said in #4 (comment) , a theme package compiled in trunk can be installed into CC15.05, but not vice versa (due to that automatic libssp dependency additions for packaged compiled in with 15.05 toolchain).

@hnyman hnyman closed this as completed Jan 10, 2017
@chron0
Copy link
Member

chron0 commented Jan 10, 2017

Thanks for re-clarifying and patiently testing, I'd still consider myself an absolute noob in terms of the inner workings of the build process and there's a lot of ground to cover when you start working without routine.

@hnyman
Copy link
Author

hnyman commented Jan 10, 2017

You are welcome.
I helped also LuttyYang to get his Material polished a bit, before it was taken into the LuCI repo.

You might actually check the "closed issues" for Material to see if you have avoided the same problems.
https://github.com/LuttyYang/luci-theme-material/issues?q=is%3Aissue+is%3Aclosed

Ps. Note that you reach the "average end-users" more easily via the forum than the developer mailing list. You should likely open a forum thread about your theme to get more feedback.

@chron0
Copy link
Member

chron0 commented Jan 11, 2017

That is a very good idea, I'll work my way through the issues to see what can be learned from it.

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

No branches or pull requests

2 participants