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

librsvg: Update to 2.46.4; also adds rustc/cargo/rust-std packages. #2514

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Lord-Kamina
Copy link
Contributor

As I mentioned in #2503, I made this a while ago and forgot to make a PR. I'm using a fairly similar approach as the one @kleisauke posted in #2499 (comment)

My rust is older than the version he used (because I originally worked on this PR back near the end of 2019); updating the RUST packages will likely prove to be a bit of work but then again, I'm not really sure they need to be updated all that often. IIRC, I downloaded a directory listing and then used Regex and perhaps a bash script to get the hashes of the relevant files; the idea being to be able to potentially support as many host systems as possible (I developed the PR running MXE on macOS, for example)

Anyway... it might have a few rough edges but it builds and is functional. One doubt I do genuinely have, though, is I'm not sure it will properly build with gcc 5.5.0, since I used 8.3.0

Just determine and download appropriate binaries for our host. We can’t match downloaded libstd with built binaries, so just download everything instead.
Just determine and download appropriate binaries for our host. We can’t match downloaded libstd with built binaries, so just download everything instead.
Just determine and download appropriate binaries for our host. We can’t match downloaded libstd with built binaries, so just download everything instead.

(and in this case, also use a nasty hack, the get-target-triplet package, to determine and download appropriate runtimes for our target)
@Lord-Kamina
Copy link
Contributor Author

Lord-Kamina commented Jun 11, 2020

I just noticed this apparently doesn't work on linux; but it works perfectly on mac.
Anybody have an idea as to why this might be happening?

It seems the issue on linux is it isn't downloading the source files, so it tries to extract them and obviously there's nothing there.

On linux I'm also getting

bash: line 0: [: too many arguments
bash: line 0: [: too many arguments

errors that are not present in mac, but I don't know a) whether they are relevant to this and b) where they're coming from.

EDIT: Nevermind, I found which files those come from and correcting it doesn't fix the issue with rustc.

@tonytheodore
Copy link
Member

The BUILD_TRIPLET detection is better achieved using rust's own naming conventions and adding that file to our ext directory (the same as we do with config.guess).

I'll think about multiple files/checksums.

@Lord-Kamina
Copy link
Contributor Author

The BUILD_TRIPLET detection is better achieved using rust's own naming conventions and adding that file to our ext directory (the same as we do with config.guess).

I'll think about multiple files/checksums.

I'm using their conventions. The idea essentially is to try and convert whatever mxe says to rust triplets. I found the bug BTW; rust does not have pc-linux, only unknown-linux.

So, changing

ifneq (, $(findstring darwin,$(BUILD)))
BUILD_TRIPLET = $(firstword $(call split,-,$(BUILD)))-apple-darwin
else
-    ifneq (, $(findstring ibm-linux,$(BUILD)))
+    ifneq (, $(findstring linux,$(BUILD)))
    BUILD_TRIPLET = $(firstword $(call split,-,$(BUILD)))-unknown-linux-gnu
    else
    BUILD_TRIPLET = $(BUILD)
    endif
endif

Fixes my logic.

@Lord-Kamina
Copy link
Contributor Author

Mind you @tonytheodore; the get-triplet-logic on rust-std.mk is still shaky. i.e. it works but only sometimes (you sometimes need to remove the install file and try again or even make a failed attempt and retry) because it's a really nasty hack. I'm of course open to better solutions for that, or ideally if it's possible, solve the core issue in mxe that necessitated that fix, i.e.:

$(TARGET) is not available outside the $(PKG)_BUILD functions.

src/rust-std.mk Outdated
endif

define DEP_TARGET
$(shell [[ -f $(MXE_TMP)/get-target-triplet.txt ]] && cat $(MXE_TMP)/get-target-triplet.txt || echo ERROR)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using double-brackets is an issue you can quote the argument like so:

[ -f "$(MXE_TMP)/get-target-triplet.txt" ]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually yeah, I'm not entirely sure why I used the double brackets instead of the alternate test format.

Also, quote files just in case.
@melroy89 melroy89 mentioned this pull request Dec 16, 2021
10 tasks
@melroy89
Copy link
Contributor

melroy89 commented Dec 28, 2021

Maybe update with upstream master?

get-triplet-logic on rust-std.mk is still shaky. i.e. it works but only sometimes (you sometimes need to remove the install file and try again or even make a failed attempt and retry) because it's a really nasty hack. I'

That doesn't sound good.

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

Successfully merging this pull request may close these issues.

None yet

4 participants