Stichting-MINIX-Research-Foundation / minix

Official MINIX sources - Automatically replicated from gerrit.minix3.org
Other
2.98k stars 970 forks source link

The /usr/pkg Seems to be Missing from some of the Default Search Paths #233

Open martinvahi opened 7 years ago

martinvahi commented 7 years ago

In the case of the MINIX3 version 3.4.0.rc6 the

/usr/pkg/lib/libpthread.so

becomes available to the classical configure script only, when one points out its parent folder at the LDFLAGS:

export LDFLAGS=" -L/usr/pkg/lib "

I haven't tested, whether the

export CFLAGS=" -I/usr/pkg/include "

is also necessary, but it probably is.

According to the following videos, the

"Andy Tanenbaum 2014:"MINIX runs a full POSIX environment..."

and the

Andy Tanenbaum 2015: "We don't have kernel threads, ... We do have pthreads in userland, as userland package, ... Packages that need pthreads and don't care, whether they are userland or kernel, they work fine."

the MINIX3 should be POSIX compliant at its userland BY DEFAULT. Requiring some paths to be described at CFLAGS/LDFLAGS to have the system obtain its DEFAULT behavior is quite a quirk.

Out-of-Topic Comment

I discovered it, and some other issues, while trying to compile the bochs simulator.

sambuc commented 7 years ago

PTHREAD is not a requirement for POSIX compliance, last time I checked.

PTHREAD is not available on MINIX at the level of the base system. If you do install it through PKGSRC, then you have access to GNU Pth, which is a user land implementation of posix threads. This implementation comes with limitations.

Therefore there is no reason to have the default flags point to those optional elements.

martinvahi commented 7 years ago

Thank You, I really like Your comments and I sincerely consider You to be very helpful and pleasant to communicate with, but the statement that

(It's NOT an exact quote) "PTHREADS is not needed, because it's not required by POSIX"

reminds me of a construct that sounds like: It's a feature, not a bug. :-D