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

starship: update to 0.50.0 #6501

Closed
wants to merge 1 commit into from
Closed

starship: update to 0.50.0 #6501

wants to merge 1 commit into from

Conversation

Grimler91
Copy link
Member

No description provided.

TERMUX_PKG_SRCURL=https://github.com/starship/starship/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=23e729ace48ec0bf6d8eff5f99003351463841f3b28fe453faceb62e6f99bae6
TERMUX_PKG_SHA256=d8f4dc9bd266f2a5c34926d361c62fdddb61cd7da4acadba5f9c175eb07602e5
TERMUX_PKG_DEPENDS="zlib"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--no-default-features"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--no-default-features"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--locked --no-default-features --features http"

--locked is required as a temporary workaround for #6432 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

@vladimyr Thanks for the help! What does --features http do here?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are two (actually three, but the third is irrelevant here) default features defined inside Starship's manifest: battery and HTTP. The battery feature is unsupported but HTTP is so it is reenabled.
https://github.com/starship/starship/blob/v0.50.0/Cargo.toml#L24-L28

Copy link
Contributor

Choose a reason for hiding this comment

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

HTTP library is used for Starship's bug reporting CLI command 🙃

@vladimyr
Copy link
Contributor

Fails with linker error that is super weird:

  = note: /usr/bin/ld: warning: libc.so, needed by /data/data/com.termux/files/usr/lib/libz.so, not found (try using -rpath or -rpath-link)

@Grimler91
Copy link
Member Author

Some environmental variables (LDFLAGS, CC and others) seem to not be set (or ignored), so it tries to compile and link a mix of native and cross-compiled code. Need to dig a bit into that, not sure why it is a problem now suddenly

@vladimyr
Copy link
Contributor

BTW, I compiled it locally in release mode and checked out linked libraries:

starship/target/release on  HEAD (0558b38) [!]                                                   
❯ ldd starship                                                                                    
libssl.so.1.1                                                                                     
libcrypto.so.1.1                                                                                  
libgit2.so                                                                                        
libdl.so                                                                                          
libc.so                                                                                           
libm.so                                                                                           
                                                                                                  
starship/target/release on  HEAD (0558b38) [!]                                                   
❯ ldd starship | xargs -n1 dpkg -S                                                                
openssl: /data/data/com.termux/files/usr/lib/libssl.so.1.1                                        
openssl: /data/data/com.termux/files/usr/lib/libcrypto.so.1.1                                     
libgit2: /data/data/com.termux/files/usr/lib/libgit2.so                                           
dpkg-query: no path found matching pattern *libdl.so*                                             
dpkg-query: no path found matching pattern *libc.so*                                              
dpkg-query: no path found matching pattern *libm.so*                                              

It seems that it depends on openssl & libgit2 but not on zlib as build.sh suggests.

@Grimler91
Copy link
Member Author

That could be the problem. It looks for libcrypto and the others in $PREFIX, fails to find them and falls back to /usr/lib/libcrypto, we'll see what the CI says

@vladimyr
Copy link
Contributor

@Grimler91 Just for the record I feel bad for harassing you with never-ending stream of Starship issues and you absolutely rock! 💯

@Grimler91
Copy link
Member Author

@vladimyr thanks for the help, rust and cargo and friends are not my expertise!

Seem to still be some cross-compilation issues. Should be solvable though

@vladimyr
Copy link
Contributor

@vladimyr thanks for the help, rust and cargo and friends are not my expertise!

You are welcome. Honestly, I was forced to learn a thing or two back in the day when I migrated all Homebrew's Rust formulas to use std_cargo_args. 🙃

Seem to still be some cross-compilation issues. Should be solvable though

I'm not sure how to help you with that one, let me know if there is anything I can do.

@finagolfin
Copy link
Member

Rust cross-compilation has been a problem for a while, which is why I simply disabled building nushell for x86_64 last year in #5773.

@vladimyr
Copy link
Contributor

Folks we have a new release: https://github.com/starship/starship/releases/tag/v0.51.0 🎉

I've just compiled it on my Arch using cargo build --release --locked and got following:

starship on  master is 📦 v0.51.0 via 🦀 v1.50.0 
❯ ldd target/release/starship               
	linux-vdso.so.1 (0x00007ffde51d1000)
	libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f5bb3cfc000)
	libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f5bb3a1e000)
	libgit2.so.1.1 => /usr/lib/libgit2.so.1.1 (0x00007f5bb3905000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f5bb38eb000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f5bb38ca000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f5bb3785000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f5bb377c000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f5bb35af000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f5bb353d000)
	libhttp_parser.so.2.9 => /usr/lib/libhttp_parser.so.2.9 (0x00007f5bb3531000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f5bb3517000)
	libssh2.so.1 => /usr/lib/libssh2.so.1 (0x00007f5bb34d7000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f5bb4282000)

Also, I compiled it on actual device too using cargo build --release --locked --no-default-features --features http (as already listed in recipe) and there are no changes compared to v0.50.0:

starship on  master [$] is 📦 v0.51.0 via 🦀 v1.50.0 
❯ ldd target/release/starship  
libssl.so.1.1
libcrypto.so.1.1
libgit2.so
libdl.so
libc.so
libm.so

In other words @Grimler91 please bump the Starship version and update the checksum. 🤞

@Grimler91 Grimler91 closed this May 5, 2021
Grimler91 added a commit that referenced this pull request May 5, 2021
@Grimler91 Grimler91 deleted the starship branch May 5, 2021 19:39
Martinvlba pushed a commit to NeoTerrm/neoterm-packages that referenced this pull request Jun 13, 2021
amuramatsu pushed a commit to amuramatsu/termux-packages that referenced this pull request Jun 26, 2021
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