DragonFlyBSD / DPorts

The dedicated application build system for DragonFly BSD
Other
89 stars 46 forks source link

devel/ncurses: shadows system libraries upon installation #169

Closed kworr closed 8 years ago

kworr commented 8 years ago

When installing said port (synth needs it) some ports that depend on systemv ncurses library stop working:

> tmux
/usr/local/lib/libncurses.so.6: version NCURSES_5.9 required by /usr/local/bin/tmux not found

Rebuilding port doesn't fix that.

kworr commented 8 years ago

I'm probably wrong about last sentence, rebuilding port live fixes that, but rebuilding port in clean env will surely result in a package with binaries linked to the system library and if devel/ncurses is installed such package would not work.

kworr commented 8 years ago

No, I'm wrong again. Even if package is installed and USES is set to ncurses:port the configuration goes fine, yet resulting binary is still inked to the system lib.

jrmarino commented 8 years ago

Did you rebuild devel/ncurses with the latest? The latest ports version is libncurses.so.6.01 and the base version is libncurses.so.6.0

They should be distinct now (they used to be the same)

kworr commented 8 years ago

Actually I just installed it today, to test synth. Rebuilding gives me:

arcade@probe\/usr/local/lib# ls -la libncurses*
-rw-r--r--  1 root  wheel  329114 09-Jan-2016 00:56 libncurses.a
-rw-r--r--  1 root  wheel      42 09-Jan-2016 00:57 libncurses.so
lrwxr-xr-x  1 root  wheel      18 09-Jan-2016 00:56 libncurses.so.6 -> libncurses.so.6.01
-rwxr-xr-x  1 root  wheel  156688 09-Jan-2016 00:57 libncurses.so.6.01
-rw-r--r--  1 root  wheel  181390 09-Jan-2016 00:56 libncurses++.a
-rw-r--r--  1 root  wheel  181446 09-Jan-2016 00:57 libncurses++w.a
-rw-r--r--  1 root  wheel  452602 09-Jan-2016 00:56 libncursesw.a
-rw-r--r--  1 root  wheel      44 09-Jan-2016 00:57 libncursesw.so
lrwxr-xr-x  1 root  wheel      19 09-Jan-2016 00:56 libncursesw.so.6 -> libncursesw.so.6.01
-rwxr-xr-x  1 root  wheel  230784 09-Jan-2016 00:57 libncursesw.so.6.01
arcade@probe\/usr/local/lib# ls -la /usr/lib/libncurses*
-r--r--r--  1 root  wheel   889790 06-Jan-2016 01:25 /usr/lib/libncurses.a
lrwxr-xr-x  1 root  wheel       20 06-Jan-2016 01:25 /usr/lib/libncurses.so -> /lib/libncurses.so.6
-r--r--r--  1 root  wheel  1002804 06-Jan-2016 01:25 /usr/lib/libncursesw.a
lrwxr-xr-x  1 root  wheel       21 06-Jan-2016 01:25 /usr/lib/libncursesw.so -> /lib/libncursesw.so.6
arcade@probe\/usr/local/lib# ls -la /lib/libncurses*
-r--r--r--  1 root  wheel  434584 06-Jan-2016 01:25 /lib/libncurses.so.6
-r--r--r--  1 root  wheel  487288 06-Jan-2016 01:25 /lib/libncursesw.so.6

And tmux doesn't work.

jrmarino commented 8 years ago

yeah, tmux probably has to be built on the system so it links to the ports version. Rolinh hit this, I think that's what fixed it for him.

Basically this has always been an issue, but the fact that ports and base had the same version (5.9) the problems didn't pop up.

The full fix for master is move libncurses to a private area and for 4.4 it's probably to force everything to use port ncurses. The whole situation is nasty.

jrmarino commented 8 years ago

I'm guessing the solution is to prevent /usr/local/lib/libncurses.so.6 from installing and have libncurses.so link directly to libncurses.so.6.01. That will require a change to the port, but its necessary.

jrmarino commented 8 years ago

Okay, here's take #2 at fixing this: 32ac523c3149462962d4b1a369b88c28617a6a6a

Rebuilding devel/ncurses and ports-mgmt/synth should allow tmux and synth to coexist (applies to all ports using ncurses)

kworr commented 8 years ago

Confirming: tmux works, clang works too (was surprised that some lib from llvm was linked to the ncurses).