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

New package: newsflash-1.4.2 #30449

Merged

Conversation

paper42
Copy link
Member

@paper42 paper42 commented Apr 23, 2021

General

Have the results of the proposed changes been tested?

  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
  • I generally don't use the affected packages but briefly tested this PR

@paper42 paper42 force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from e6ef288 to 12d5232 Compare April 23, 2021 14:17
@ericonr ericonr added the new-package This PR adds a new package label Apr 23, 2021
@paper42
Copy link
Member Author

paper42 commented Apr 23, 2021

Could someone who knows a bit more about rust help me with this? With a cargo style I get this error for x86_64

   Compiling news_flash_gtk v0.0.0 (/builddir/news_flash_gtk-1.4.0)
error[E0583]: file not found for module `config`
  --> src/main.rs:10:1
   |
10 | mod config;
   | ^^^^^^^^^^^
   |
   = help: to create the module `config`, create file "src/config.rs"

error[E0432]: unresolved imports `crate::config::APP_ID`, `crate::config::VERSION`
 --> src/about_dialog.rs:1:21
  |
1 | use crate::config::{APP_ID, VERSION};
  |                     ^^^^^^  ^^^^^^^ no `VERSION` in `config`
  |                     |
  |                     no `APP_ID` in `config`

error[E0432]: unresolved imports `crate::config::APP_ID`, `crate::config::VERSION`
  --> src/app.rs:41:21
   |
41 | use crate::config::{APP_ID, VERSION};
   |                     ^^^^^^  ^^^^^^^ no `VERSION` in `config`
   |                     |
   |                     no `APP_ID` in `config`

error[E0432]: unresolved imports `crate::config::APP_ID`, `crate::config::PROFILE`
 --> src/main_window.rs:3:21
  |
3 | use crate::config::{APP_ID, PROFILE};
  |                     ^^^^^^  ^^^^^^^ no `PROFILE` in `config`
  |                     |
  |                     no `APP_ID` in `config`

error[E0432]: unresolved imports `crate::config::APP_ID`, `crate::config::VERSION`
  --> src/main.rs:31:21
   |
31 | use crate::config::{APP_ID, VERSION};
   |                     ^^^^^^  ^^^^^^^ no `VERSION` in `config`
   |                     |
   |                     no `APP_ID` in `config`

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0432, E0583.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `news_flash_gtk`

To learn more, run the command again with --verbose.
=> ERROR: newsflash-1.4.0_1: do_build: '${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}' exited with 101
=> ERROR:   in do_build() at common/build-style/cargo.sh:8

and this for cross compilation to aarch64-musl:

    Compiling tokio-socks v0.5.1
   Compiling migrations_macros v1.4.2
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-musl/lib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.0.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.1.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.10.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.11.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.12.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.13.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.14.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.15.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.2.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.3.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.4.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.5.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.6.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.7.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.8.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.migrations_macros.9f7cpa8o-cgu.9.rcgu.o" "-o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libmigrations_macros-e707bafd203bf499.so" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.1hdzd0offbjbwt09.rcgu.o" "/builddir/news_flash_gtk-1.4.0/target/release/deps/migrations_macros-e707bafd203bf499.51urjryglzpjx5xg.rcgu.o" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/builddir/news_flash_gtk-1.4.0/target/release/deps" "-L" "/usr/aarch64-linux-musl/usr/lib64" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libsyn-499914c5cf0939fe.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libquote-62ae0d4acea3123c.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libproc_macro2-7337699de5e403c4.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libunicode_xid-2f4d60e65c6873c8.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libproc_macro-35c216bbea69744c.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libmigrations_internals-f3521533faf9ff94.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libdiesel-a71d4c85b1493c0b.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libchrono-944a1352aebaa9dd.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libnum_integer-a9d3f7da378bb509.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libnum_traits-19139710d265f95d.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libtime-f15467a1ed143cc7.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/liblibsqlite3_sys-f71c377f34ba427d.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libr2d2-61973b354ed5db24.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libscheduled_thread_pool-daee67bbd2c02fcd.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libparking_lot-236321e4081038cd.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libparking_lot_core-c7f33480bca4f994.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/liblibc-35de491d76a6566f.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libsmallvec-b7b3bf092b6d804b.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/liblock_api-a47268985d4b5fac.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libscopeguard-adfc1a2bbe15cac6.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libinstant-a4c342659f33aed6.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/liblog-4dee82e1e9857b01.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libserde-1fcbbcc9923501af.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libcfg_if-8ee8a695684dc026.rlib" "/builddir/news_flash_gtk-1.4.0/target/release/deps/libbyteorder-3a2f2ca9139e7be9.rlib" "-Wl,--start-group" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-76976accc703b94c.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-4b4836c8001c38f8.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-95d198864b3d1d1f.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler-89ca85673eb71089.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-e5ebaacea13b2e04.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-358b8941bfcead58.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-e1c15bfce4c95efe.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-285f51788d3c177e.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-9dd8abfdbc1f8062.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-631c814025b624db.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-c37d0a722cd048ec.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-993f6d0b2dd2e7ad.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-8670652876cf0bfd.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-85a91bd6a26d270f.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-9009ed2cd1239574.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-52b5fb2830d36002.rlib" "-Wl,--end-group" "/usr/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-ee038198b3ae1a76.rlib" "-Wl,-Bdynamic" "-lsqlite3" "-lssp_nonshared" "-lgcc_s" "-lssp_nonshared" "-lc"
  = note: /usr/bin/ld: skipping incompatible /usr/aarch64-linux-musl/usr/lib64/libsqlite3.so when searching for -lsqlite3
          /usr/bin/ld: skipping incompatible /usr/aarch64-linux-musl/usr/lib64/libsqlite3.a when searching for -lsqlite3
          /usr/bin/ld: cannot find -lsqlite3
          /usr/bin/ld: skipping incompatible /usr/aarch64-linux-musl/usr/lib64/libsqlite3.so when searching for -lsqlite3
          /usr/bin/ld: skipping incompatible /usr/aarch64-linux-musl/usr/lib64/libssp_nonshared.a when searching for -lssp_nonshared
          /usr/bin/ld: skipping incompatible /usr/aarch64-linux-musl/usr/lib64/libgcc_s.so.1 when searching for libgcc_s.so.1
          /usr/bin/ld: skipping incompatible /usr/aarch64-linux-musl/usr/lib64/libgcc_s.so.1 when searching for libgcc_s.so.1
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: could not compile `migrations_macros`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
=> ERROR: newsflash-1.4.0_1: do_build: '${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}' exited with 101
=> ERROR:   in do_build() at common/build-style/cargo.sh:8

When I use meson build style and add rust-std to makedepends I get a different error on aarch64-musl cross compilation (x86_64 and i686 works fine):

  Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.64
   Compiling libc v0.2.88
error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `libc`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: build failed
[2/3] Generating com.gitlab.newsflash.appdata.xml_data_merge with a custom command
FAILED: src/com.gitlab.newsflash 
/builddir/news_flash_gtk-1.4.0/build-aux/cargo.sh .. src/com.gitlab.newsflash /builddir/news_flash_gtk-1.4.0/build '' '--features "readability"'
ninja: build stopped: subcommand failed.

@ericonr
Copy link
Member

ericonr commented Apr 23, 2021

I think it's expected to build with meson, which will generate the file with the version info, maybe?

So try adding build_helper=rust

@paper42 paper42 force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from 12d5232 to 3438a6e Compare April 29, 2021 15:23
@notthewave
Copy link
Contributor

notthewave commented Jul 3, 2021

#24218 can be closed then

@ericonr
Copy link
Member

ericonr commented Jul 4, 2021

Why not call it news_flash_gtk like that PR did?

@paper42
Copy link
Member Author

paper42 commented Jul 4, 2021

Why not call it news_flash_gtk like that PR did?

I think newsflash makes more sense:

  • all other distributions call this package newsflash
  • the executable name is com.gitlab.newsflash
  • the desktop file uses the name "News Flash"
  • the readme in the repository uses NewsFlash

@ericonr
Copy link
Member

ericonr commented Jul 4, 2021

Ok, that makes sense. Have you verified that an update file isn't needed?

@paper42 paper42 force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from 3438a6e to 9db4e9b Compare July 4, 2021 19:17
@paper42
Copy link
Member Author

paper42 commented Jul 4, 2021

Ok, that makes sense. Have you verified that an update file isn't needed?

Just fixed it with an update :)

@paper42
Copy link
Member Author

paper42 commented Jul 4, 2021

this update needs newer rust

@paper42 paper42 changed the title New package: newsflash-1.4.0 New package: newsflash-1.4.2 Jul 4, 2021
@paper42 paper42 force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from 9db4e9b to 3705701 Compare July 5, 2021 18:39
Comment on lines 19 to 20
vsed -i build-aux/cargo.sh \
-e 's,"$CARGO_TARGET_DIR"/${TARGET}/news_flash_gtk,"$CARGO_TARGET_DIR"/'"${XBPS_CROSS_RUST_TARGET}/"'${TARGET}/news_flash_gtk,'
Copy link
Member

Choose a reason for hiding this comment

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

Please use the same sed as https://github.com/void-linux/void-packages/pull/24218/files

Is the CARGO_HOME one not necessary?

@paper42 paper42 force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from 3705701 to b5f9deb Compare July 9, 2021 21:48
@notthewave
Copy link
Contributor

notthewave commented Jul 13, 2021

Your post-patch section is different from #24218 e.g. you have "," instead of "/".
Seems to build fine for me on aarch64-musl with post-patch section of said PR. (still building though...)

@paper42 paper42 force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from b5f9deb to 7c328b2 Compare July 14, 2021 13:48
@paper42
Copy link
Member Author

paper42 commented Jul 14, 2021

Your post-patch section is different from #24218 e.g. you have "," instead of "/".
Seems to build fine for me on aarch64-musl with post-patch section of said PR. (still building though...)

@notthewave Thanks for noticing this, I am not sure why I missed it. We don't need to remove the CARGO_HOME line anyway, not sure why, but it works without patching it, there is probably a variable which has higher priority (maybe CARGO_TARGET_DIR?). I couldn't find it mentioned in the documentation, but it works fine.

The CI is still failing for some architectures, because cargo.io is unreliable.

makedepends="rust-std webkit2gtk-devel libhandy1-devel openssl-devel"
short_desc="RSS feed reader that supports various web based services"
maintainer="Michal Vasilek <michal@vasilek.cz>"
license="GPL-3.0-only"
Copy link
Member

Choose a reason for hiding this comment

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

@ericonr ericonr force-pushed the 0084-New-package-newsflash-1.4.0.patch branch from 7c328b2 to 90f9d93 Compare July 14, 2021 14:52
@ericonr ericonr merged commit 0045ad7 into void-linux:master Jul 14, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2021
@paper42 paper42 deleted the 0084-New-package-newsflash-1.4.0.patch branch April 8, 2022 11:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-package This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants