Opened 17 months ago

Last modified 14 months ago

#71815 assigned defect

llvm-16 does not have notes about port select

Reported by: brandelune (Jean-Christophe Helary) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: Cc:
Port: llvm-16

Description

Installing llvm-16 puts all the binaries in the expected location (/opt/local/bin/) with "-mp-16" suffixed names, but does not create non-suffixed aliases.

That creates all sorts of "command not found" errors when building software that requires llvm.

Non-suffixed aliases seemed to have been created by older versions of llvm (I used to have llvm-10 and the aliases were there) but uninstalling llvm-10 did not remove the aliases, also creating similar errors.

Change History (11)

comment:1 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)

Use sudo port select llvm to create or delete those unsuffixed aliases.

comment:2 Changed 17 months ago by brandelune (Jean-Christophe Helary)

This is what I get:

sudo port select llvm   
Password:
Available versions for llvm:
	mp-llvm-16
	none

If I use the available version, I get this:

sudo port select mp-llvm-16
Warning: Unable to get active selected version: The specified group 'mp-llvm-16' does not exist.
Error: The 'list' command failed: The specified group 'mp-llvm-16' does not exist.

If I use the way the version that is referred to for the install (llvm-16), I get this:

sudo port select llvm-16   
Warning: Unable to get active selected version: The specified group 'llvm-16' does not exist.

I’ve checked the message after the llvm-16 install and the only thing I get is:

sudo port install llvm-16
--->  Computing dependencies for llvm-16
--->  Fetching archive for llvm-16
--->  Attempting to fetch llvm-16-16.0.6_1.darwin_21.x86_64.tbz2 from https://kmq.jp.packages.macports.org/llvm-16
--->  Attempting to fetch llvm-16-16.0.6_1.darwin_21.x86_64.tbz2.rmd160 from https://kmq.jp.packages.macports.org/llvm-16
--->  Installing llvm-16 @16.0.6_1
--->  Activating llvm-16 @16.0.6_1
--->  Cleaning llvm-16                                   
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

If creating the aliases to actually make use of llvm is a requirement, it seems to me that the information should be available in that part of the install process. For most of the other packages, that does not seem to be a requirement and the aliases seem to be automatically created.

comment:3 Changed 17 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

Something definitely seems amiss with your system, as it works fine for me (see below).

Can you run sudo port -N rev-upgrade, followed by sudo port diagnose, and paste the output in here?

$ sudo port select --set llvm mp-llvm-16
Selecting 'mp-llvm-16' for 'llvm' succeeded. 'mp-llvm-16' is now active.

$ gfind /opt/local/bin -name "llvm-*" -type l -ls
170472096      0 lrwxr-xr-x   1 root     admin          33 Jan 12 12:09 /opt/local/bin/llvm-cxxdump -> /opt/local/bin/llvm-cxxdump-mp-16
170472076      0 lrwxr-xr-x   1 root     admin          32 Jan 12 12:09 /opt/local/bin/llvm-config -> /opt/local/bin/llvm-config-mp-16
170472077      0 lrwxr-xr-x   1 root     admin          29 Jan 12 12:09 /opt/local/bin/llvm-cov -> /opt/local/bin/llvm-cov-mp-16
170472082      0 lrwxr-xr-x   1 root     admin          30 Jan 12 12:09 /opt/local/bin/llvm-link -> /opt/local/bin/llvm-link-mp-16
170472090      0 lrwxr-xr-x   1 root     admin          36 Jan 12 12:09 /opt/local/bin/llvm-symbolizer -> /opt/local/bin/llvm-symbolizer-mp-16
170472085      0 lrwxr-xr-x   1 root     admin          33 Jan 12 12:09 /opt/local/bin/llvm-objdump -> /opt/local/bin/llvm-objdump-mp-16
170472087      0 lrwxr-xr-x   1 root     admin          32 Jan 12 12:09 /opt/local/bin/llvm-rtdyld -> /opt/local/bin/llvm-rtdyld-mp-16
170472100      0 lrwxr-xr-x   1 root     admin          29 Jan 12 12:09 /opt/local/bin/llvm-lto -> /opt/local/bin/llvm-lto-mp-16
170472097      0 lrwxr-xr-x   1 root     admin          32 Jan 12 12:09 /opt/local/bin/llvm-c-test -> /opt/local/bin/llvm-c-test-mp-16
170472098      0 lrwxr-xr-x   1 root     admin          29 Jan 12 12:09 /opt/local/bin/llvm-dwp -> /opt/local/bin/llvm-dwp-mp-16
170472095      0 lrwxr-xr-x   1 root     admin          29 Jan 12 12:09 /opt/local/bin/llvm-dsymutil -> /opt/local/bin/dsymutil-mp-16
170472083      0 lrwxr-xr-x   1 root     admin          28 Jan 12 12:09 /opt/local/bin/llvm-mc -> /opt/local/bin/llvm-mc-mp-16
170472074      0 lrwxr-xr-x   1 root     admin          28 Jan 12 12:09 /opt/local/bin/llvm-as -> /opt/local/bin/llvm-as-mp-16
170472084      0 lrwxr-xr-x   1 root     admin          28 Jan 12 12:09 /opt/local/bin/llvm-nm -> /opt/local/bin/llvm-nm-mp-16
170472099      0 lrwxr-xr-x   1 root     admin          29 Jan 12 12:09 /opt/local/bin/llvm-lib -> /opt/local/bin/llvm-lib-mp-16
170472073      0 lrwxr-xr-x   1 root     admin          28 Jan 12 12:09 /opt/local/bin/llvm-ar -> /opt/local/bin/llvm-ar-mp-16
170472079      0 lrwxr-xr-x   1 root     admin          29 Jan 12 12:09 /opt/local/bin/llvm-dis -> /opt/local/bin/llvm-dis-mp-16
170472088      0 lrwxr-xr-x   1 root     admin          30 Jan 12 12:09 /opt/local/bin/llvm-size -> /opt/local/bin/llvm-size-mp-16
170472093      0 lrwxr-xr-x   1 root     admin          33 Jan 12 12:09 /opt/local/bin/llvm-readobj -> /opt/local/bin/llvm-readobj-mp-16
170472080      0 lrwxr-xr-x   1 root     admin          35 Jan 12 12:09 /opt/local/bin/llvm-dwarfdump -> /opt/local/bin/llvm-dwarfdump-mp-16
170472094      0 lrwxr-xr-x   1 root     admin          34 Jan 12 12:09 /opt/local/bin/llvm-profdata -> /opt/local/bin/llvm-profdata-mp-16
170472081      0 lrwxr-xr-x   1 root     admin          33 Jan 12 12:09 /opt/local/bin/llvm-extract -> /opt/local/bin/llvm-extract-mp-16
170472101      0 lrwxr-xr-x   1 root     admin          31 Jan 12 12:09 /opt/local/bin/llvm-split -> /opt/local/bin/llvm-split-mp-16
170472075      0 lrwxr-xr-x   1 root     admin          36 Jan 12 12:09 /opt/local/bin/llvm-bcanalyzer -> /opt/local/bin/llvm-bcanalyzer-mp-16
170472089      0 lrwxr-xr-x   1 root     admin          32 Jan 12 12:09 /opt/local/bin/llvm-stress -> /opt/local/bin/llvm-stress-mp-16
170472078      0 lrwxr-xr-x   1 root     admin          30 Jan 12 12:09 /opt/local/bin/llvm-diff -> /opt/local/bin/llvm-diff-mp-16
170472086      0 lrwxr-xr-x   1 root     admin          32 Jan 12 12:09 /opt/local/bin/llvm-ranlib -> /opt/local/bin/llvm-ranlib-mp-16

$ sudo port select --set llvm none
Selecting 'none' for 'llvm' succeeded. 'none' is now active.

$ gfind /opt/local/bin -name "llvm-*" -type l -print
$
Last edited 17 months ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:4 Changed 17 months ago by brandelune (Jean-Christophe Helary)

sudo port -N rev-upgrade
Password:
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
sudo port diagnose

does not output anything.

I have cleaned my system about 2 months ago by removing al traces of previous brew/port installs and then started anew with the lastes version of port.

comment:5 Changed 17 months ago by brandelune (Jean-Christophe Helary)

It happens that selecting llvm-16 now did create the aliases:

find /opt/local/bin -name "llvm-*" -type l -ls 
89210229        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:04 /opt/local/bin/llvm-cxxdump -> /opt/local/bin/llvm-cxxdump-mp-16
89210209        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:04 /opt/local/bin/llvm-config -> /opt/local/bin/llvm-config-mp-16
89210210        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:04 /opt/local/bin/llvm-cov -> /opt/local/bin/llvm-cov-mp-16
89210215        0 lrwxr-xr-x    1 root             wheel                  30 Jan 13 07:04 /opt/local/bin/llvm-link -> /opt/local/bin/llvm-link-mp-16
89210223        0 lrwxr-xr-x    1 root             wheel                  36 Jan 13 07:04 /opt/local/bin/llvm-symbolizer -> /opt/local/bin/llvm-symbolizer-mp-16
89210218        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:04 /opt/local/bin/llvm-objdump -> /opt/local/bin/llvm-objdump-mp-16
89210220        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:04 /opt/local/bin/llvm-rtdyld -> /opt/local/bin/llvm-rtdyld-mp-16
89210233        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:04 /opt/local/bin/llvm-lto -> /opt/local/bin/llvm-lto-mp-16
89210230        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:04 /opt/local/bin/llvm-c-test -> /opt/local/bin/llvm-c-test-mp-16
89210231        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:04 /opt/local/bin/llvm-dwp -> /opt/local/bin/llvm-dwp-mp-16
89210228        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:04 /opt/local/bin/llvm-dsymutil -> /opt/local/bin/dsymutil-mp-16
89210216        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:04 /opt/local/bin/llvm-mc -> /opt/local/bin/llvm-mc-mp-16
89210207        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:04 /opt/local/bin/llvm-as -> /opt/local/bin/llvm-as-mp-16
89210217        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:04 /opt/local/bin/llvm-nm -> /opt/local/bin/llvm-nm-mp-16
89210232        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:04 /opt/local/bin/llvm-lib -> /opt/local/bin/llvm-lib-mp-16
89210206        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:04 /opt/local/bin/llvm-ar -> /opt/local/bin/llvm-ar-mp-16
89210212        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:04 /opt/local/bin/llvm-dis -> /opt/local/bin/llvm-dis-mp-16
89210221        0 lrwxr-xr-x    1 root             wheel                  30 Jan 13 07:04 /opt/local/bin/llvm-size -> /opt/local/bin/llvm-size-mp-16
89210226        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:04 /opt/local/bin/llvm-readobj -> /opt/local/bin/llvm-readobj-mp-16
89210213        0 lrwxr-xr-x    1 root             wheel                  35 Jan 13 07:04 /opt/local/bin/llvm-dwarfdump -> /opt/local/bin/llvm-dwarfdump-mp-16
89210227        0 lrwxr-xr-x    1 root             wheel                  34 Jan 13 07:04 /opt/local/bin/llvm-profdata -> /opt/local/bin/llvm-profdata-mp-16
89210214        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:04 /opt/local/bin/llvm-extract -> /opt/local/bin/llvm-extract-mp-16
89210234        0 lrwxr-xr-x    1 root             wheel                  31 Jan 13 07:04 /opt/local/bin/llvm-split -> /opt/local/bin/llvm-split-mp-16
89210208        0 lrwxr-xr-x    1 root             wheel                  36 Jan 13 07:04 /opt/local/bin/llvm-bcanalyzer -> /opt/local/bin/llvm-bcanalyzer-mp-16
89210222        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:04 /opt/local/bin/llvm-stress -> /opt/local/bin/llvm-stress-mp-16
89210211        0 lrwxr-xr-x    1 root             wheel                  30 Jan 13 07:04 /opt/local/bin/llvm-diff -> /opt/local/bin/llvm-diff-mp-16
89210219        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:04 /opt/local/bin/llvm-ranlib -> /opt/local/bin/llvm-ranlib-mp-16

Also, when I run uninstall and then check the aliases, they are still there:

sudo port uninstall llvm-16
--->  Deactivating llvm-16 @16.0.6_1
--->  Cleaning llvm-16
--->  Uninstalling llvm-16 @16.0.6_1
--->  Cleaning llvm-16


find /opt/local/bin -name "llvm-*" -type l -ls
89210473        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:06 /opt/local/bin/llvm-cxxdump -> /opt/local/bin/llvm-cxxdump-mp-16
89210453        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:06 /opt/local/bin/llvm-config -> /opt/local/bin/llvm-config-mp-16
89210454        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:06 /opt/local/bin/llvm-cov -> /opt/local/bin/llvm-cov-mp-16
89210459        0 lrwxr-xr-x    1 root             wheel                  30 Jan 13 07:06 /opt/local/bin/llvm-link -> /opt/local/bin/llvm-link-mp-16
89210467        0 lrwxr-xr-x    1 root             wheel                  36 Jan 13 07:06 /opt/local/bin/llvm-symbolizer -> /opt/local/bin/llvm-symbolizer-mp-16
89210462        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:06 /opt/local/bin/llvm-objdump -> /opt/local/bin/llvm-objdump-mp-16
89210464        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:06 /opt/local/bin/llvm-rtdyld -> /opt/local/bin/llvm-rtdyld-mp-16
89210477        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:06 /opt/local/bin/llvm-lto -> /opt/local/bin/llvm-lto-mp-16
89210474        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:06 /opt/local/bin/llvm-c-test -> /opt/local/bin/llvm-c-test-mp-16
89210475        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:06 /opt/local/bin/llvm-dwp -> /opt/local/bin/llvm-dwp-mp-16
89210472        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:06 /opt/local/bin/llvm-dsymutil -> /opt/local/bin/dsymutil-mp-16
89210460        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:06 /opt/local/bin/llvm-mc -> /opt/local/bin/llvm-mc-mp-16
89210451        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:06 /opt/local/bin/llvm-as -> /opt/local/bin/llvm-as-mp-16
89210461        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:06 /opt/local/bin/llvm-nm -> /opt/local/bin/llvm-nm-mp-16
89210476        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:06 /opt/local/bin/llvm-lib -> /opt/local/bin/llvm-lib-mp-16
89210450        0 lrwxr-xr-x    1 root             wheel                  28 Jan 13 07:06 /opt/local/bin/llvm-ar -> /opt/local/bin/llvm-ar-mp-16
89210456        0 lrwxr-xr-x    1 root             wheel                  29 Jan 13 07:06 /opt/local/bin/llvm-dis -> /opt/local/bin/llvm-dis-mp-16
89210465        0 lrwxr-xr-x    1 root             wheel                  30 Jan 13 07:06 /opt/local/bin/llvm-size -> /opt/local/bin/llvm-size-mp-16
89210470        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:06 /opt/local/bin/llvm-readobj -> /opt/local/bin/llvm-readobj-mp-16
89210457        0 lrwxr-xr-x    1 root             wheel                  35 Jan 13 07:06 /opt/local/bin/llvm-dwarfdump -> /opt/local/bin/llvm-dwarfdump-mp-16
89210471        0 lrwxr-xr-x    1 root             wheel                  34 Jan 13 07:06 /opt/local/bin/llvm-profdata -> /opt/local/bin/llvm-profdata-mp-16
89210458        0 lrwxr-xr-x    1 root             wheel                  33 Jan 13 07:06 /opt/local/bin/llvm-extract -> /opt/local/bin/llvm-extract-mp-16
89210478        0 lrwxr-xr-x    1 root             wheel                  31 Jan 13 07:06 /opt/local/bin/llvm-split -> /opt/local/bin/llvm-split-mp-16
89210452        0 lrwxr-xr-x    1 root             wheel                  36 Jan 13 07:06 /opt/local/bin/llvm-bcanalyzer -> /opt/local/bin/llvm-bcanalyzer-mp-16
89210466        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:06 /opt/local/bin/llvm-stress -> /opt/local/bin/llvm-stress-mp-16
89210455        0 lrwxr-xr-x    1 root             wheel                  30 Jan 13 07:06 /opt/local/bin/llvm-diff -> /opt/local/bin/llvm-diff-mp-16
89210463        0 lrwxr-xr-x    1 root             wheel                  32 Jan 13 07:06 /opt/local/bin/llvm-ranlib -> /opt/local/bin/llvm-ranlib-mp-16

Obviously, what happened is that I used llvm-10 for a while, with its aliases that were then installed, then uninstalled it, installed llvm-16 instead, the aliases pointed at something wrong so I removed them and I was left with no way to run llvm-16.

It seems to me that the install process should indicate that there is a necessity to run "select", and the uninstall process should either remove the installed aliases automatically or indicate that there is a necessity to use a different command to remove them manually.

comment:6 in reply to:  5 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to brandelune:

It happens that selecting llvm-16 now did create the aliases:

Great.

Also, when I run uninstall and then check the aliases, they are still there:

That's correct. MacPorts doesn't touch the symlinks at this time because it doesn't know what your intentions are. You specify your intentions by running sudo port select llvm again.

Obviously, what happened is that I used llvm-10 for a while, with its aliases that were then installed, then uninstalled it, installed llvm-16 instead, the aliases pointed at something wrong so I removed them and I was left with no way to run llvm-16.

It seems to me that the install process should indicate that there is a necessity to run "select", and the uninstall process should either remove the installed aliases automatically or indicate that there is a necessity to use a different command to remove them manually.

There is no necessity to use port select. You are able to run e.g. MacPorts clang-16 by referring to it by its full name clang-mp-16. You only need to use port select if you wish to have the convenience of referring to it by the abbreviated name clang.

It is customary for ports with which you can use the select mechanism to have a message in their notes field explaining this, for example:

% port notes python312
--->  python312 has the following notes:
  To make this the default Python or Python 3 (i.e., the version run by the 'python' or 'python3' commands), run one or both of:
  
      sudo port select --set python python312
      sudo port select --set python3 python312

I agree that the llvm and clang ports don't appear to print such a note.

comment:7 Changed 17 months ago by brandelune (Jean-Christophe Helary)

Is it possible to change the "defect" to "llvm and clang do not print a message regarding the necessity to call 'select' to create the aliases"? It seems to me that it would solve my problem.

comment:8 Changed 17 months ago by jmroot (Joshua Root)

Port: llvm-16 added; llvm removed
Summary: llvm-16 does not create non-suffixed aliasesllvm-16 does not have notes about port select

comment:9 Changed 14 months ago by brandelune (Jean-Christophe Helary)

Is there any progress on this issue?

comment:10 in reply to:  9 Changed 14 months ago by mascguy (Christopher Nielsen)

Cc: mascguy removed
Owner: set to mascguy
Status: newassigned

Replying to brandelune:

Is there any progress on this issue?

I'll try to fix this in the coming days. Sorry for the delay.

comment:11 Changed 14 months ago by brandelune (Jean-Christophe Helary)

Please do not apologize. I was just making sure that the issue was not forgotten about. I understand that everything here is accomplished on a volunteer basis.

Note: See TracTickets for help on using tickets.