Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How would I go about compiling mkclean with static libraries

Featured Replies

So I'm not sure if this is the correct place for this post, so apologies in advance if I should have posted this elsewhere.

 

My question in short is, how would I go about compiling the mkclean with static libraries?  Longer explanation with some context below.

 

mkclean, is one of several tools that can be used to cleanup and optimize matroska based video containers.  They include some other utilities that are handy as well here: https://github.com/Matroska-Org/foundation-source

 

I thought I would attempt to use the mkclean binary package specifically as part of a post-processing script within a docker container.

 

With the assistance of the devpack plugin I was able to compile the matroska utilities from source.  The problem is that I cannot execute the binaries from within a docker container.  I suspect the reason that's not possible is due to dynamically linked libraries:

 

root@4bb49dcb91f6:/utils$ ldd mkclean
	/lib64/ld-linux-x86-64.so.2 (0x14d447b80000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x14d44782e000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x14d447b80000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x14d44761c000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x14d447b80000)
root@4bb49dcb91f6:/utils$ ls /lib64
ls: cannot access '/lib64': No such file or directory
root@4bb49dcb91f6:/utils$ ls /usr/lib64/
ls: cannot access '/usr/lib64/': No such file or directory
root@4bb49dcb91f6:/utils$ ls /lib64
ls: cannot access '/lib64': No such file or directory
root@4bb49dcb91f6:/utils$

Of course, from within unraid, the binary executes just fine.

 

So, I suppose this means I need to build mkclean (and the other binaries I want to use) from source, but with statically linked libraries; so how would I go about that?

 

Thanks!

  • Author

After talking this over with some friends; I got help creating a custom docker build file:

 

```

FROM alpine

RUN apk add --update git build-base openssh
WORKDIR /app/
RUN git clone https://github.com/Matroska-Org/foundation-source.git
WORKDIR /app/foundation-source/
RUN gcc corec/tools/coremake/coremake.c -o coremake
RUN ./coremake gcc_linux_x64
RUN make -C spectool
RUN make -C mkvalidator
RUN make -C mkclean


FROM linuxserver/nzbget 

COPY --from=0 /app/foundation-source/release/gcc_linux_x64/mkclean /usr/bin/
```

 

I created a dockerhub repo in case anyone is curious or wants to try it out here:

 

https://hub.docker.com/r/j9ac9k/nzbget_mktools/

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.