00:36
fuwei has quit [Quit: Konversation terminated!]
04:02
zsun has joined #fedora-riscv
04:49
zsun has quit [Quit: Leaving.]
06:24
zsun has joined #fedora-riscv
07:35
davidlt has joined #fedora-riscv
07:45
zsun has quit [Quit: Leaving.]
08:53
fuwei has joined #fedora-riscv
08:57
zsun has joined #fedora-riscv
09:07
zsun has quit [Quit: Leaving.]
09:17
zsun has joined #fedora-riscv
09:21
U2FsdGVkX1 has joined #fedora-riscv
09:21
<
fuwei >
ping U2FsdGVkX1
09:21
zsun has quit [Client Quit]
09:23
<
fuwei >
Please explain the lp64d dir problem with glibc/gcc/meson
09:24
<
fuwei >
rwmjones_: and djdelorie may can help
09:26
<
U2FsdGVkX1 >
Client: HexChat 2.16.1 • OS: Microsoft Windows 11 专业版 (x64) • CPU: AMD Ryzen 7 7700X 8-Core Processor (4.50GHz) • Memory: 15.7 GiB Total (3.5 GiB Free) • Storage: 575.9 GiB / 634.9 GiB (59.0 GiB Free) • VGA: Parsec Virtual Display Adapter, Radeon RX 580 Series • Uptime: 7h 27m 29s
09:27
<
U2FsdGVkX1 >
sorry, wrong message
09:28
<
rwmjones_ >
fuwei: hey
09:28
<
rwmjones_ >
so I don't think it is necessarily a problem
09:29
<
rwmjones_ >
there's discussion of it on the fedora-devel mailing list last week
09:29
<
U2FsdGVkX1 >
now meson has a problem on fedora riscv
09:29
<
U2FsdGVkX1 >
with meson find_library function
09:29
<
rwmjones_ >
davidlt: ^^
09:30
<
U2FsdGVkX1 >
because fedora glibc install to /lib64/lp64d, and it's a softlink to /lib64
09:30
<
fuwei >
rwmjones_: let me check it in mailing list , but what is the conclusion?
09:31
<
rwmjones_ >
fuwei: well there was not really any conclusion :-(
09:31
<
U2FsdGVkX1 >
when meson searches for libraries, it call gcc to search for libraries
09:31
<
rwmjones_ >
U2FsdGVkX1: do you have an example of a build failure / something showing the error messages?
09:34
<
U2FsdGVkX1 >
gcc will return "/lib64/lp64d/.../lib64/lp64d/" library directory
09:35
<
U2FsdGVkX1 >
Normally it is equivalent to /lib64
09:35
<
davidlt >
Yes, there is a problem with meson (sometimes) where we get a wrong path.
09:35
<
U2FsdGVkX1 >
but meson has "optimized" the path
09:36
<
U2FsdGVkX1 >
became /lib64/lib64/lp64d
09:36
<
davidlt >
Usually I found that a broken PC file is involved, but something else in meson logic is triggering this.
09:37
<
davidlt >
So the problem is that riscv64 is no FHS compliant. We don't do things like Debian where things are installed based on a triplet.
09:37
<
davidlt >
Thus we have a symlink so that both, /usr/lib64 and /usr/lib64/lp64d, work depending on what software does.
09:37
<
rwmjones_ >
U2FsdGVkX1: what's the actual package that fails to build?
09:37
<
davidlt >
But not all software handle symlink lp64d -> . properly
09:38
<
davidlt >
The easiest way here would be to debug meson, and shouldn't be too difficult
09:39
* rwmjones_
is watching FOSDEM right now
09:39
<
U2FsdGVkX1 >
Here's a snippet of code that reproduces
09:40
<
davidlt >
and you get: ninja: error: '/lib64/lib64/lp64d/libGenericCodeGen.a', needed by 'src/libplacebo.so.338', missing and no known rule to make it
09:41
<
rwmjones_ >
right, with U2FsdGVkX1 's example I get
09:41
<
U2FsdGVkX1 >
yes, libplacebo also causes this problem due to newer versions using meson
09:41
<
rwmjones_ >
ninja: error: '/lib64/lib64/lp64d/libbz2.so', needed by 'main', missing and no known rule to make it
09:42
<
davidlt >
It's on a TODO list debug meson at some point
09:42
<
rwmjones_ >
is the problem in /usr/lib64/pkgconfig/bzip2.pc ? or in meson?
09:43
<
davidlt >
most likely meson logic
09:43
<
davidlt >
not handling symlink which points back to the parent directory
09:43
<
davidlt >
but again, in some of these cases I found broken PC files, fixing those fixed the problem
09:43
<
rwmjones_ >
fuwei: did you get the email I sent about FAS accounts?
09:44
<
davidlt >
but in general someone needs to debug meson, and look why double /lib64/lib64 happens.
09:44
<
fuwei >
rwmjones_: yes, I just asked them about this info
09:44
<
rwmjones_ >
fuwei: ok no rush, I just wanted to check you saw the email
09:44
<
fuwei >
will reply right away
09:44
<
rwmjones_ >
no rush :-)
09:45
<
rwmjones_ >
I won't be able to do anything about it til next week anyway
09:45
<
davidlt >
U2FsdGVkX1, are you planning on debugging this?
09:45
<
U2FsdGVkX1 >
as meson searches for libraries, ".." will be optimized and merged
09:45
<
U2FsdGVkX1 >
I've debugged it and think the problem from glibc and gcc
09:46
<
davidlt >
In that case we need more details.
09:46
<
davidlt >
I still think meson logic just doesn't work for us.
09:46
<
rwmjones_ >
do you have suggested patches? note this doesn't affect autoconf or pkgconf so seems more likely to be meson-specific
09:46
<
davidlt >
I am not sure what ".." optimized and merged means here.
09:46
<
davidlt >
It is meson specific.
09:47
<
U2FsdGVkX1 >
No, it's not meson's problem
09:47
<
davidlt >
We need more details.
09:47
<
U2FsdGVkX1 >
when you use "gcc --print-search-dirs", you also get this wrong directory
09:48
<
rwmjones_ >
/lib64/lp64d/.../lib64/lp64d/ ?
09:49
<
U2FsdGVkX1 >
yes, when meson gets this directory, meson handles it in the above function
09:49
<
davidlt >
I think I might have a ticket on this or similar thing for X years ago
09:50
<
davidlt >
there is also a thing where ld.bfd generates "lib6464"
09:52
<
rwmjones_ >
I don't see any problem in the output of 'gcc --print-search-dirs'
09:52
<
rwmjones_ >
& I still don't understand the problem in _get_library_dirs either
09:53
<
U2FsdGVkX1 >
Let me rephrase that
09:55
<
U2FsdGVkX1 >
gcc gets "/lib64/lp64d/../lib64/lp64d" with --print-search-dirs, which is handled in meson by the _get_library_dirs function
09:55
<
davidlt >
So yeah, there is /lib64/lp64d/../lib64/lp64d
09:55
<
fuwei >
rwmjones_: email sent
09:55
<
U2FsdGVkX1 >
then calls python os.path.abspath
09:55
<
davidlt >
That resolves (readlink -f) to /usr/lib64
09:56
<
U2FsdGVkX1 >
You can do this in python
09:56
<
U2FsdGVkX1 >
os.path.abspath("/lib64/lp64d/../lib64/lp64d")
09:56
<
U2FsdGVkX1 >
It will return '/lib64/lib64/lp64d'
09:56
<
davidlt >
Does that resolve/canonicalize symlinks?
09:57
<
rwmjones_ >
$ realpath /lib64/lp64d/../lib64/lp64d/
09:57
<
rwmjones_ >
/usr/lib64
09:58
<
U2FsdGVkX1 >
but meson uses python os.path.abspath function
09:58
<
davidlt >
So this should go through readlink 1st
09:58
<
rwmjones_ >
>>> os.path.abspath("/lib64/lp64d/../lib64/lp64d")
09:58
<
rwmjones_ >
'/lib64/lib64/lp64d'
09:58
<
rwmjones_ >
ok so that still sounds like python / meson is broken
09:58
<
davidlt >
Python is probably OK, but meson didn't expect symlinks in the paths
09:58
<
rwmjones_ >
I do understand the problem now though, so thanks
10:01
<
davidlt >
So yeah, os.path.realpath() dumps canonicalized path
10:01
<
davidlt >
In that case probably abs is not required too.
10:02
<
davidlt >
Python documentation states:
10:02
<
davidlt >
"""This string manipulation may change the meaning of a path that contains symbolic links."""
10:02
<
davidlt >
That's what happening.
10:02
<
davidlt >
abspath changes the path meaning because symbolic link exit.
10:02
<
davidlt >
That's meson bug (most likely).
10:03
<
davidlt >
They have to canonilize (I cannot write this word) 1st.
10:03
<
U2FsdGVkX1 >
Yes, that's what I call "optimized"
10:03
<
rwmjones_ >
canonicalize :-)
10:03
<
davidlt >
File a meson bug with all the details and CC us. If you have a path before doing that it would be even better :)
10:04
<
davidlt >
Sorry, late Saturday morning :)
10:04
<
rwmjones_ >
the path is weird, but it does resolve properly .. so meson ought to be able to handle it
10:04
<
rwmjones_ >
yeah that sounds like a plan to me
10:04
<
davidlt >
readlink -f / realpath does the right thing AFAIK, and it works.
10:04
<
davidlt >
meson doesn't incl. a check too, that abspath didn't break anything.
10:05
<
rwmjones_ >
U2FsdGVkX1: do you agree, file a bug against meson?
10:05
<
rwmjones_ >
fuwei: thanks, got the reply, I'll action that next week
10:06
<
rwmjones_ >
fuwei: do you know tingting mao? she's giving a talk right now at fosdem
10:06
<
rwmjones_ >
she works at raycom I think
10:07
<
davidlt >
rwmjones_, which talk is this?
10:07
<
U2FsdGVkX1 >
I would think this is a problem with glibc&gcc, because directories like /lib64/lp64d/../lib64/lp64d should not be included
10:07
<
rwmjones_ >
to watch the livestream you have to do it through element (see chat link)
10:07
<
davidlt >
it's still a valid path
10:08
<
rwmjones_ >
U2FsdGVkX1: the path is still valid (I agree it's very weird)
10:08
<
rwmjones_ >
so at the end of the day, meson ought to not break it
10:08
<
rwmjones_ >
libtool doens't have a problem with it
10:08
<
davidlt >
Surprisingly it only breaks sometimes, most meson using projects build fine.
10:08
<
rwmjones_ >
there could be other OSes that use symlinks and meson would be broken on those too
10:09
<
davidlt >
It would be great if we could remove this symlink staff long term, but I am not willing to test it :)
10:10
<
rwmjones_ >
agree on that too, but the bigger point some other platform could be using symlinks for a different reason, and meson would be broken there as well, which points to a meson bug
10:10
<
davidlt >
Yeah, meson needs to properly handle it, and Python documentation tells it could break paths if using this function with symlinks.
10:10
<
rwmjones_ >
so fixing this in meson will help others
10:11
<
davidlt >
So that's definitely a bug on meson side even if you don't like how paths could look like on Linux :)
10:14
<
U2FsdGVkX1 >
ok i will try to solve this problem in meson
10:15
<
rwmjones_ >
U2FsdGVkX1: I think filing a bug is the first step, even if you then fix the meson bug
10:15
<
rwmjones_ >
can you CC me & davidlt on that too?
10:15
<
davidlt >
os.path.realpath will canonicalize the path
10:16
<
davidlt >
Correct. I think there is enough information with your investigation + the chat to properly describe the issue and get feedback sooner than later.
10:18
<
rwmjones_ >
I was just looking to see if the bug is already reported, but I don't see anything
10:19
<
U2FsdGVkX1 >
Okay, I will CC on do that
10:19
<
rwmjones_ >
that minimal example you gave was great for reproducing it
10:22
<
rwmjones_ >
I am @rwmjones on github
10:22
<
davidlt >
@davidlt for me
10:23
<
U2FsdGVkX1 >
Roger that :)
10:32
<
davidlt >
I kinda poked around the files, still cannot see where abspath is used
10:33
<
davidlt >
Probably the actual implementation is mesonbuild/compilers/mixins/gnu.py
10:33
<
davidlt >
and _split_fetch_real_dirs talks about thing being fragile somewhat
10:35
<
davidlt >
oh, have to reboot
10:36
fuwei has quit [Quit: Konversation terminated!]
10:38
davidlt has quit [Remote host closed the connection]
10:48
davidlt has joined #fedora-riscv
11:45
U2FsdGVkX1 has quit [Remote host closed the connection]
12:08
davidlt has quit [Ping timeout: 240 seconds]
13:14
zsun has joined #fedora-riscv
13:23
davidlt has joined #fedora-riscv
13:24
davidlt has quit [Remote host closed the connection]
13:28
davidlt has joined #fedora-riscv
15:27
zsun has quit [Quit: Leaving.]
17:02
fuwei has joined #fedora-riscv
19:19
davidlt has quit [Ping timeout: 256 seconds]
20:04
fuwei has quit [Ping timeout: 240 seconds]
20:04
fuwei has joined #fedora-riscv