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

Correct detecting of installing paths for i386 #652

Closed
wants to merge 1 commit into from

Conversation

shadinua
Copy link
Contributor

@shadinua shadinua commented Jun 4, 2020

The approach we used previously, was based on getting the cc -dumpmachine value as a part of the target directory. It works well on x86_64, but on i386 the incorrect directory was drawn up.

= x86_64

[/usr]/lib/x86_64-linux-gnu

$ cc -dumpmachine
x86_64-linux-gnu

$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu")
SEARCH_DIR("=/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/lib/x86_64-linux-gnu64")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib")

= i386

[/usr]/lib/i686-linux-gnu

$ cc -dumpmachine
i686-linux-gnu

$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/local/lib/i386-linux-gnu")
SEARCH_DIR("=/lib/i386-linux-gnu")
SEARCH_DIR("=/usr/lib/i386-linux-gnu")
SEARCH_DIR("=/usr/local/lib32")
SEARCH_DIR("=/lib32")
SEARCH_DIR("=/usr/lib32")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
SEARCH_DIR("=/usr/i686-linux-gnu/lib32")
SEARCH_DIR("=/usr/i686-linux-gnu/lib")

So the suggested solution is to simply use i386-linux-gnu instead of i686-linux-gnu, which works well on all i386 Debian/Ubuntu distributives.

The approach we used previously, was based on getting the `cc -dumpmachine` value as a part of the target directory. It works well on x86_64, but on i386 the incorrect directory was drawn up.

= x86_64

`[/usr]/lib/x86_64-linux-gnu`

```
$ cc -dumpmachine
x86_64-linux-gnu

$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu")
SEARCH_DIR("=/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/lib/x86_64-linux-gnu")
SEARCH_DIR("=/usr/lib/x86_64-linux-gnu64")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64")
SEARCH_DIR("=/usr/x86_64-linux-gnu/lib")
```

= i386

`[/usr]/lib/i686-linux-gnu`

```
$ cc -dumpmachine
i686-linux-gnu

$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/local/lib/i386-linux-gnu")
SEARCH_DIR("=/lib/i386-linux-gnu")
SEARCH_DIR("=/usr/lib/i386-linux-gnu")
SEARCH_DIR("=/usr/local/lib32")
SEARCH_DIR("=/lib32")
SEARCH_DIR("=/usr/lib32")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
SEARCH_DIR("=/usr/i686-linux-gnu/lib32")
SEARCH_DIR("=/usr/i686-linux-gnu/lib")
```

So the suggested solution is to simply use `i386-linux-gnu` instead of `i686-linux-gnu`, which works well on all i386 Debian/Ubuntu distributives.
@shadinua shadinua added the infrastructure Automated building and packaging label Jun 4, 2020
@shadinua shadinua requested review from ilammy and Lagovas June 4, 2020 18:50
@shadinua shadinua requested a review from vixentael as a code owner June 4, 2020 18:50
@shadinua shadinua self-assigned this Jun 4, 2020
@shadinua
Copy link
Contributor Author

shadinua commented Jun 4, 2020

Since we suddenly got two PRs on the same issue, take the best from both and update the PR #651.

@shadinua shadinua closed this Jun 4, 2020
@ilammy ilammy deleted the shadinua/i386_libdir_path branch June 8, 2020 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Automated building and packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant