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

Meta issue for 'failed to create symbolic link '/opt/displaylink/libstdc++.so.6' (Debian) #931

Open
Barabazs opened this issue May 3, 2024 · 18 comments

Comments

@Barabazs
Copy link
Collaborator

Barabazs commented May 3, 2024

#805
#855

Description:
Installation on Debian often fails with
ln: failed to create symbolic link '/opt/displaylink/libstdc++.so.6': No such file or directory

Potential hacky workaround:
#805 (comment)

Root cause:
this code block from 2017 which may or may not be needed anymore...

# fix: issue #42 (dlm.service can't start)
# note: for this to work libstdc++6 package needs to be installed from >= Stretch
if [ "$lsb" == "Debian" ] || [ "$lsb" == "Devuan" ] || [ "$lsb" == "Kali" ];
then
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/displaylink/libstdc++.so.6
fi

I don't have access to a Debian install and don't have the capacity to troubleshoot this on a VM. I would appreciate it if someone can try do comment out the code block and perform the installation on a fresh Debian install. (so not tainted with a previous displaylink install)

@Barabazs Barabazs changed the title Meta issue for 'failed to create symbolic link '/opt/displaylink/....' (Debian) Meta issue for 'failed to create symbolic link '//opt/displaylink/libstdc++.so.6' (Debian) May 3, 2024
@Barabazs Barabazs changed the title Meta issue for 'failed to create symbolic link '//opt/displaylink/libstdc++.so.6' (Debian) Meta issue for 'failed to create symbolic link '/opt/displaylink/libstdc++.so.6' (Debian) May 3, 2024
@Barabazs Barabazs pinned this issue May 3, 2024
@rogue73
Copy link
Contributor

rogue73 commented Jun 6, 2024

Hi Barabazs, I've done quickly a fresh install of debian 12. Then I've comment out the above block and could perfectly install and setup displaylink.
Also on my existing installation (Debian sid/unstable) I could install displaylink and it doesn't matter if the lines above are comment out or not.

I think these line can be removed.

Cheers
rogue73

@Barabazs
Copy link
Collaborator Author

Barabazs commented Jun 7, 2024

Thanks @rogue73!
Can you check if this file exists please? /usr/lib/x86_64-linux-gnu/libstdc++.so.6

@rogue73
Copy link
Contributor

rogue73 commented Jun 7, 2024

@Barabazs Hi, /usr/lib/x86_64-linux-gnu/libstdc++.so.6 exist as symlink to /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30

@AngelBlue01
Copy link

Hi I ran mkdir -p /opt/displaylink and ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/displaylink/libstdc++.so.6 as suggested in #805 now I get the error

sed: can't read /lib/systemd/system/displaylink-driver.service: No such file or directory

@tymek1317
Copy link

Hi I ran mkdir -p /opt/displaylink and ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/displaylink/libstdc++.so.6 as suggested in #805 now I get the error

sed: can't read /lib/systemd/system/displaylink-driver.service: No such file or directory

Same here

@nigelsim
Copy link

nigelsim commented Nov 7, 2024

In my system (Debian 12 Kernel 6.1.0-26-amd64) my when I get the above issues (ln and displaylink-driver.service) it because the EVDI build fails, but the installer continues as if it succeeds.

install.log

Unfortunately, the EVDI build cleans itself up, meaning we lose the logs when run using the installer.

Running the EVDI build by hand, I see the following errors:

/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c: In function ‘evdifb_create’:
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c:408:23: error: ‘struct drm_fb_helper’ has no member named ‘info’
  408 |         efbdev->helper.info = info;
      |                       ^
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c: In function ‘evdi_fbdev_destroy’:
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c:468:27: error: ‘struct drm_fb_helper’ has no member named ‘info’
  468 |         if (efbdev->helper.info) {
      |                           ^
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c:469:38: error: ‘struct drm_fb_helper’ has no member named ‘info’
  469 |                 info = efbdev->helper.info;
      |                                      ^
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c: In function ‘evdi_fbdev_unplug’:
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c:560:27: error: ‘struct drm_fb_helper’ has no member named ‘info’
  560 |         if (efbdev->helper.info) {
      |                           ^
/var/lib/dkms/evdi/1.14.7/build/evdi_fb.c:563:38: error: ‘struct drm_fb_helper’ has no member named ‘info’
  563 |                 info = efbdev->helper.info;
      |                                      ^
make[2]: *** [/usr/src/linux-headers-6.1.0-26-common/scripts/Makefile.build:255: /var/lib/dkms/evdi/1.14.7/build/evdi_fb.o] Error 1

I hope this isn't a red herring.

@nigelsim
Copy link

nigelsim commented Nov 8, 2024

If I revert this commit in EVDI then it compiles as expected DisplayLink/evdi@88ef73d

To implement, I ran the installer. Once it failed, I extracted 6.1/displaylink-driver-6.1/evdi.tar.gz patched the evdi_fb.c and recompressed, replacing the tar.gz file. Then, ran ./displaylink-installer.sh install from within 6.1/displaylink-driver-6.1

I'll file an upstream bug report later.

Just as a note, uname -a reports Linux magrathea 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux. On first glance I read this as running Kernel version 6.1.0 but it is actually 6.1.112, which is why I needed revert the commit because it incorrectly switched to the new DRM struct at version 6.1.51 when it isn't actually introduced until 6.2.0 torvalds/linux@9877d8f

@matteoopenf
Copy link

any news I have the same errore on debian 12 PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux ?

@matteoopenf
Copy link

/usr/lib/x86_64-linux-gnu/libstdc++.so.6

in my case exist

@matteoopenf
Copy link

in my case try to find the file here ln: failed to create symbolic link '/opt/displaylink/libstdc++.so.6': No such file or directory
not in the directory you mean above

@mulderij
Copy link

in my case try to find the file here ln: failed to create symbolic link '/opt/displaylink/libstdc++.so.6': No such file or directory not in the directory you mean above

As mentioned in #931 (comment) this is because the dir /opt/displaylink doesn't exist. However creating that dir results in the next error about sed: can't read /lib/systemd/system/displaylink-driver.service: No such file or directory

@matteoopenf
Copy link

matteoopenf commented Nov 13, 2024

in my case try to find the file here ln: failed to create symbolic link '/opt/displaylink/libstdc++.so.6': No such file or directory not in the directory you mean above

As mentioned in #931 (comment) this is because the dir /opt/displaylink doesn't exist. However creating that dir results in the next error about sed: can't read /lib/systemd/system/displaylink-driver.service: No such file or directory

Mmm and there is a fix or a way to create the missing file and directory?

@nigelsim
Copy link

Upstream issues raised DisplayLink/evdi#499

@eBug
Copy link

eBug commented Dec 16, 2024

#961 throws the same ln error

@eBug
Copy link

eBug commented Dec 16, 2024

#805 #855

Description: Installation on Debian often fails with ln: failed to create symbolic link '/opt/displaylink/libstdc++.so.6': No such file or directory

Potential hacky workaround: #805 (comment)

Root cause: this code block from 2017 which may or may not be needed anymore...

# fix: issue #42 (dlm.service can't start)
# note: for this to work libstdc++6 package needs to be installed from >= Stretch
if [ "$lsb" == "Debian" ] || [ "$lsb" == "Devuan" ] || [ "$lsb" == "Kali" ];
then
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/displaylink/libstdc++.so.6
fi

I don't have access to a Debian install and don't have the capacity to troubleshoot this on a VM. I would appreciate it if someone can try do comment out the code block and perform the installation on a fresh Debian install. (so not tainted with a previous displaylink install)

I just tried your workaround on my Debian 12 install.

As others pointed out, there's no more ln error but it's sed complaining now:

sed: can't read /lib/systemd/system/displaylink-driver.service: No such file or directory

@eBug
Copy link

eBug commented Dec 16, 2024

If I revert this commit in EVDI then it compiles as expected DisplayLink/evdi@88ef73d

To implement, I ran the installer. Once it failed, I extracted 6.1/displaylink-driver-6.1/evdi.tar.gz patched the evdi_fb.c and recompressed, replacing the tar.gz file. Then, ran ./displaylink-installer.sh install from within 6.1/displaylink-driver-6.1

I'll file an upstream bug report later.

Just as a note, uname -a reports Linux magrathea 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux. On first glance I read this as running Kernel version 6.1.0 but it is actually 6.1.112, which is why I needed revert the commit because it incorrectly switched to the new DRM struct at version 6.1.51 when it isn't actually introduced until 6.2.0 torvalds/linux@9877d8f

reverting the commit you mention by hand, and re-running ./displaylink-installer.sh install got the module compiled here. Thx.

How would I install the systemctl scripts afterwards?

@nigelsim
Copy link

nigelsim commented Dec 22, 2024

The upstream issue has been resolved in evdi 1.14.8. Because the embedded evdi.tar.gz has the top level directory stripped out, the simplest may be to apply the following patch to this repo, which I adapted from #955

diff --git a/displaylink-debian.sh b/displaylink-debian.sh
index 68f5947..3e83a2a 100755
--- a/displaylink-debian.sh
+++ b/displaylink-debian.sh
@@ -368,6 +368,15 @@ then
        ln -sf /lib/modules/$(uname -r)/build/Makefile /lib/modules/$(uname -r)/build/Kconfig
 fi
 
+# Replace evdi with newer version
+evdi_ver=1.14.8
+echo 'Replacing evdi...'
+mkdir evdi
+wget https://github.com/DisplayLink/evdi/archive/refs/tags/v${evdi_ver}.tar.gz
+tar -xzf v${evdi_ver}.tar.gz --strip-components=1 -C evdi
+tar -czf $driver_dir/displaylink-driver-${version}/evdi.tar.gz -C evdi .
+rm -rf evdi v${evdi_ver}.tar.gz
+
 # Patch displaylink-installer.sh to prevent reboot before our script is done.
 patchName="displaylink-installer.patch"
 finalPatchPath="$resourcesDir$patchName"

Probably unrelated, but on my Intel NUC, using the displaylink-debian.sh I had to update my /etc/X11/xorg.conf.d/20-displaylink.conf to which I didn't have to do previously when I ran the patched ./displaylink-installer.sh install:

Section "Device"
#    Identifier  "Intel"
#    Driver      "intel"
    Identifier  "DisplayLink"
    Driver      "modesetting"
    Option      "PageFlip" "false"
EndSection

@mulderij
Copy link

Probably unrelated, but on my Intel NUC, using the displaylink-debian.sh I had to update my /etc/X11/xorg.conf.d/20-displaylink.conf to which I didn't have to do previously when I ran the patched ./displaylink-installer.sh install:

Section "Device"
#    Identifier  "Intel"
#    Driver      "intel"
    Identifier  "DisplayLink"
    Driver      "modesetting"
    Option      "PageFlip" "false"
EndSection

Yes, this is unrelated. However it would be nice if this could be fixed for Intel Video. Currently I always edit this by hand after running the setup.
#228 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants