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

synocli-devel update - Add libtool and strace #5824

Merged
merged 21 commits into from Aug 2, 2023

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Jul 29, 2023

Description

synocli-devel update:

  • Add libtree as ldd alternative
  • Add clang-tools-extra
  • Add strace (thnx @hgy59)

Fixes #

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jul 29, 2023

@hgy59 so relating to #5820 I've been trying to get ldd along with llvm-readelf available from our NAS. This PR tries to address this so it is easier to confirm what's the status of the build shared libraries.

Still having issues with building llvm-readelf but ldd is now OK, at least on DSM-7.1

@hgy59
Copy link
Contributor

hgy59 commented Jul 30, 2023

@th0ma7 did you notice that the build of unsupported 88f6281 and qoriq had a long build time (1h 15m and 1h 55m) before the build was cancelled?

EDIT:
I don't know what's going wrong in the build action, but local builds of unsupported archs are terminated immediately....

Probably it is the build of native/llvm-9.0.
Did you ever try to install llvm9.0.1 in native/llvm instead of building it from source?

@hgy59
Copy link
Contributor

hgy59 commented Jul 30, 2023

@th0ma7 and I have prepared strace to be added (strace was already proposed in #3253)

@hgy59
Copy link
Contributor

hgy59 commented Jul 30, 2023

Did you ever try to install llvm9.0.1 in native/llvm instead of building it from source?

Ok, found that lvm 9.0.1 installer for ubuntu is lacking the clang-tblgen tool 😞

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jul 30, 2023

Did you ever try to install llvm9.0.1 in native/llvm instead of building it from source?

Ok, found that lvm 9.0.1 installer for ubuntu is lacking the clang-tblgen tool 😞

I actually whished i knew how to build a truly minimal llvm/clang with just the needed tools to limit wasted cycles in native. Or better find it elsewhere and just dowloading it. Unless it's available somehow in ppa or elsewhere and we just add it to the base image?

@th0ma7 th0ma7 self-assigned this Jul 30, 2023
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jul 30, 2023

@th0ma7 and I have prepared strace to be added (strace was already proposed in #3253)

@hgy59 Great addition! Would you mind adding symlinks entries in the synocli-devel Makefile?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jul 30, 2023

@hgy59 BTW, while I got glibc to build correctly it ends-up colliding with gmp dependency from binutils when included in the synocli-devel build... I've reached-out for assistance from the libc-help mailing list (https://sourceware.org/pipermail/libc-help/2023-July/006428.html), wait & see.

Otherwise the package would be mostly ready for release.

@th0ma7 th0ma7 requested a review from hgy59 July 31, 2023 20:05
@th0ma7
Copy link
Contributor Author

th0ma7 commented Jul 31, 2023

@hgy59 I've found an interesting ldd alternative called libtree ... seems to build just fine on evey arch. Most importantly, it allows to confirm all libraries 🚀

root@th0ma7-nas:/var/packages/beets/target# find . -name "*.so" -exec libtree -p -v {} \;
./lib/libexslt.so 
├── /var/packages/beets/target/lib/libxslt.so.1 [rpath]
│   ├── /var/packages/beets/target/lib/libxml2.so.2 [rpath]
│   │   ├── /var/packages/beets/target/lib/libz.so.1 [rpath]
│   │   │   └── /lib/libc.so.6 [default path]
│   │   ├── /var/packages/python311/target/lib/liblzma.so.5 [rpath]
│   │   │   ├── /lib/libpthread.so.0 [default path]
│   │   │   │   ├── /lib/libc.so.6 [default path]
│   │   │   │   └── /lib/ld-linux-x86-64.so.2 [default path]
│   │   │   └── /lib/libc.so.6 [default path]
│   │   ├── /lib/libdl.so.2 [default path]
│   │   ├── /lib/libm.so.6 [default path]
│   │   ├── /lib/libpthread.so.0 [default path]
│   │   └── /lib/libc.so.6 [default path]
│   ├── /lib/libc.so.6 [default path]
│   ├── /lib/libpthread.so.0 [default path]
│   └── /lib/libm.so.6 [default path]
├── /var/packages/beets/target/lib/libxml2.so.2 [rpath]
├── /lib/libc.so.6 [default path]
├── /lib/libm.so.6 [default path]
└── /lib/libpthread.so.0 [default path]

- add gprofng shared libraries to PLIST
- gprofng does not build for 32-bit archs and targets must be removed from PLIST
@hgy59
Copy link
Contributor

hgy59 commented Aug 1, 2023

@th0ma7 binutils PLIST fix should finally fix the build...

@th0ma7
Copy link
Contributor Author

th0ma7 commented Aug 1, 2023

binutils PLIST fix should finally fix the build...

@hgy59 thnx, I had started a full build at home but this is taking so long to get all the results that I pushed it as-is knowing a fix would follow shortly thereafter.

With this I believe we're all set and this one can be merged (pending last roud of github-action builds).

- avoid custom targets
- add diyspk/libtree
@hgy59
Copy link
Contributor

hgy59 commented Aug 1, 2023

@th0ma7 just added a small update to libtree Makefile.

can you remember what the ADDITIONAL_LDLAGS = -static was for? I get binary identical targets without this option.

@th0ma7 th0ma7 changed the title synocli-devel update - Add glibc ldd toolset synocli-devel update - Add libtool and strace Aug 1, 2023
@th0ma7
Copy link
Contributor Author

th0ma7 commented Aug 1, 2023

can you remember what the ADDITIONAL_LDLAGS = -static was for? I get binary identical targets without this option.

It was the recommended build method from the project github page. Guessing it can be removed?

@hgy59
Copy link
Contributor

hgy59 commented Aug 1, 2023

@th0ma7 another question: Is it worth to have ARMv5_ARCH specific builds when ARMv5 is not supported at all in spk/synocli-devel/Makefile?

I'll try to build for ARMv5 to find unsupported dependencies....

@th0ma7
Copy link
Contributor Author

th0ma7 commented Aug 1, 2023

@hgy59 guessing armv5 could be supported probably as long as we remove LLVM ... along with perhaps a few others. Having the ability to provide libtree and other tools on that old platform could be beneficial.

@hgy59
Copy link
Contributor

hgy59 commented Aug 1, 2023

@hgy59 guessing armv5 could be supported probably as long as we remove LLVM ... along with perhaps a few others. Having the ability to provide libtree and other tools on that old platform could be beneficial.

yes llvm-9.0 is the first (and only?) dependency that fails to build for ARMv5 (Host GCC version must be at least 4.8, your version is 4.6.4.)

@hgy59
Copy link
Contributor

hgy59 commented Aug 1, 2023

@th0ma7 I tried to build llvm 3.3 for ARMv5 but gave up (there is no common target to build llvm and clang) or is there any benefit to include llvm without clang?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Aug 1, 2023

@th0ma7 I tried to build llvm 3.3 for ARMv5 but gave up (there is no common target to build llvm and clang) or is there any benefit to include llvm without clang?

Wow, how couragous of you, respect! 🙇‍♂️

Honestly, I wouldn't bother with that at all. Having a few minimal tools for ARMv5 is already a success story, congrats! And thnx for simplifying libtree, nice work. Other than that, I believe it's now good for a merge?

EDIT: All build sucessfull on my end and install/upgrades OK on x86_64.

Copy link
Contributor

@hgy59 hgy59 left a comment

Choose a reason for hiding this comment

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

LGTM

@th0ma7 th0ma7 merged commit 36cdc3b into SynoCommunity:master Aug 2, 2023
17 checks passed
@th0ma7 th0ma7 deleted the devel-update branch August 2, 2023 19:36
@th0ma7 th0ma7 added status/published Published and activated (may take up to 48h until visible in DSM package manager) and removed status/ready-to-merge labels Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/published Published and activated (may take up to 48h until visible in DSM package manager)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants