Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

/bin/sh: 1: /usr/bin/edje_cc: not found #39

Open
RossComputerGuy opened this issue Jan 28, 2020 · 17 comments
Open

/bin/sh: 1: /usr/bin/edje_cc: not found #39

RossComputerGuy opened this issue Jan 28, 2020 · 17 comments

Comments

@RossComputerGuy
Copy link

Description

When cross-compiling, edje_cc should be used from the cross-compiling host directory instead of the main system's bin directory.

Steps to reproduce

1.Set up a cross-compiling environment
2. Compile entrance

@wltjr
Copy link
Member

wltjr commented Jan 28, 2020

Hi, thanks for the report. There are two ways to specify the path via configure options. The first is using the --prefix /path configure option. The second way, is specific to edje_cc, using the -Dedje-cc=/path/to/edje_cc configure option. One of those should work for a non-standard location. Otherwise, if you specify neither, it defaults to system via pkg-config.

$ pkg-config --variable=prefix edje
/usr

There might be an issue with the --prefix option. Or more specifically, I might need to add in another conditional here in meson.build. But the -Dedje-cc=/path/to/edje_cc configure option will work and avoids that issue.

See if that helps resolve the issue. If not, I can see about making further modifications.

@RossComputerGuy
Copy link
Author

I originally did not specify the edje_cc path, I don't know what is set with Buildroot but entrance tried pkg-config which got /usr/bin/edje_cc. I think there should be a variable that specifies the host directory (i.e host-dir). That would prefix the edje-cc variable if it does not start with host-dir.

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

That is exactly the purpose of -Dedje-cc=/path/to/edje_cc configure option. If that is not set, it will fall back to pkg-config from system. Although, I would think there to be some pkg-config in the cross compile env that would have a localized path rather than the host system. That might be a meson bug.

FYI, I am handling edje_cc exactly the same as Rage and similar to Terminology for example, see lines 73 and 98-102 in Terminology. It is very likely, you will run into the same issue with Rage, Terminology, and other apps. They all have the same configure option, at least Rage and Terminology , to specify a path to edje_cc. That is all the same, as it is in entrance.

Are you not able to set -Dedje-cc=/path/to/edje_cc in Buildroot? If not, then I will look into some alternative solution.

@RossComputerGuy
Copy link
Author

I can set it in Buildroot but I think it'll be better if the meson file can find edje_cc instead

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

It would if the pkg-config returned a path within the cross compile env. Have you looked into that? Is that something off with Buildroot or meson? It seems like, Meson maybe calling system pkg-config instead of one in the cross compile env. Do you have two pkg-config binaries, one on host and one in cross compile env? I am assuming, there is just one pkg-config.

It seems for cross compiling, you should set PKG_CONFIG_LIBDIR or PKG_CONFIG_PATH per this link. That may not work because it will still use the existing host path, and likely return that one before any alternative path specified in PKG_CONFIG_PATH . That seems to be more a solution for library dependencies not binary.

The only other way I can think off offhand, is to use the prefix path and append /bin/edje_cc. I will bring up the issue to other EFL developers and get their feedback.

I will be doing some cross compiling for arm in the next month. But I think Gentoo will handle this all differently.

@RossComputerGuy
Copy link
Author

I've not looked at that, I know that certain things are set already in Buildroot for pkg-config.

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

Yes, I could be reading this commit wrong, but it seems to imply that it prefers system over alternatives for some reason.

This commit might have something you can use to switch pkg-config binaries.

It also seems I reversed my terminology, as host for Buildroot seems to be within the cross compile env. Where I was using host as the system that contains the cross compile env, per that last commit link. Seems if you add host-pkgconf to the Buildroot package, it will use the cross compiled pkg-config rather than the system one. That should return a different path to edje_cc, to the one within the cross compile env.

@RossComputerGuy
Copy link
Author

Alright, https://github.com/ExpidusOS/buildroot/commit/e99c19234e78bfe2a4e41e421a91a0fba5548fc7 should use host-pkgconfig. That should work, I'll see once the build finishes.

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

Sweet, hopefully, that will resolve any issues. Its interesting how they invert names. From VMs the host is usually the system VMs are running on. For Buildroot, host is the cross compile env. Learn something new every day! Always good to explore things. I earned a bit more about pkg-config and a little Buildroot. Thanks again for the report.

@RossComputerGuy
Copy link
Author

2020-01-29T06:26:13.5617111Z /usr/bin/edje_cc -id /tmp/tmp.ytyJNxJ834/buildroot-output/build/entrance-3.0.0_alpha6/data/themes/default/images ../data/themes/default/default.edc data/themes/default/default.edj
2020-01-29T06:26:13.5617521Z /bin/sh: 1: /usr/bin/edje_cc: not found

Still tries host.

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

Is there another pkg-config in /tmp/tmp.ytyJNxJ834/buildroot-output/ somewhere? I think that option for buildroot only works when another pkg-config is present in the host cross compile env. I guess adding that host-pkgconfig does not pull in the dependency or something. You might want to inquire with the Buildroot community how to get a pkg-config in the host cross compile env, so, it will use that rather than system pkg-config.

For now, I would just go with -Dedje-cc=/path/to/edje_cc pointing to edje_cc in /tmp/tmp.ytyJNxJ834/buildroot-output/. Unless, that is not possible due to it being a generated path. I am assuming that might be the case given the tmp.ytyJNxJ834 directory. That seems generated vs a static path that you can use for -Dedje-cc=/path/to/edje_cc

@RossComputerGuy
Copy link
Author

There should be pkg-config in buildroot-output/staging, buildroot-output/host, and buildroot-output/target

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

For some reason, it is not using any of those and reverting to system pkg-config.

@RossComputerGuy
Copy link
Author

Even though the system pkg-config does not have EFL installed? The meson file should check that.

@wltjr
Copy link
Member

wltjr commented Jan 29, 2020

The system must be finding something to return that path. It comes from a edje.pc file. If that file was not found, then it would not return a valid path. Look for edje.pc on both system and host cross compile env. If the edje.pc file is in the host cross compile env, then something is not putting that in a chroot such that it uses the host root directory vs system root directory.

I have a feeling that the edje.pc file has prefix=/usr, and rather than using /usr in the host cross compile env, it is reverting to the systems /usr directory. Either the host cross compile env should be in a chroot, or that path should be different like prefix=/tmp/tmp.ytyJNxJ834/buildroot-output/*/usr/.

The problem is likely the edje.pc file prefix path combined with how its being built. Either need to chroot the build, or see about having a different prefix path that is relative to the path of the host cross compile env.

@wltjr
Copy link
Member

wltjr commented Mar 20, 2020

@RossComputerGuy what is the status of this issue? Are you still experiencing the issue, or did you find a solution? Thanks!

@RossComputerGuy
Copy link
Author

I think so, my OS builder is having issues

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

No branches or pull requests

2 participants