GithubHelp home page GithubHelp logo

FTBFS on kfreebsd about nocache HOT 20 CLOSED

feh avatar feh commented on June 4, 2024
FTBFS on kfreebsd

from nocache.

Comments (20)

Feh avatar Feh commented on June 4, 2024

Hmm. I don’t have access to a system running kfreebsd. But POSIX_FADV_DONTNEED should be defined in /usr/include/fcntl.h or one of the files it includes…

from nocache.

Feh avatar Feh commented on June 4, 2024

See the source of kfreebsd-9_9.0-11/sys/sys/fcntl.h:

/*
 * XXX missing posix_fadvise() and POSIX_FADV_* macros.
 */

What is to be done?

from nocache.

noushi avatar noushi commented on June 4, 2024

Hi there,

It should be mentioned:
. kfreebsd isn't up to date regarding the /sys/fcntl.h -> kfreebsd folks should update their file.
. freebsd is up to date as shown here: http://fxr.watson.org/fxr/source/sys/fcntl.h

The question is: does (k)FreeBSD support posix_fadvise() correctly? does it behave like Linux's implementation?

As I recall, the nocache implementation includes a workaround for some unavailable features in the Linux kernel?

cheers,
Reda

from nocache.

Feh avatar Feh commented on June 4, 2024

As I recall, the nocache implementation includes a workaround for some unavailable features in the Linux kernel?

Not really. I just had to split the posix_fadvise stuff off to another file, because:

/* Since open() and close() are re-defined in nocache.c, it's not
 * possible to include <fcntl.h> there. So we do it here. */

from nocache.

noushi avatar noushi commented on June 4, 2024

ha, good to know.

This should fix things inside cachedel.c : noushi@4a81dca

#if __POSIX_VISIBLE < 200112
#define POSIX_FADV_NORMAL       0       /* no special treatment */
#define POSIX_FADV_RANDOM       1       /* expect random page references */
#define POSIX_FADV_SEQUENTIAL   2       /* expect sequential page references */
#define POSIX_FADV_WILLNEED     3       /* will need these pages */
#define POSIX_FADV_DONTNEED     4       /* dont need these pages */
#define POSIX_FADV_NOREUSE      5       /* access data only once */
#endif

from nocache.

noushi avatar noushi commented on June 4, 2024

Dmitry (@onlyjob), could you retry the builds now?

from nocache.

onlyjob avatar onlyjob commented on June 4, 2024

Yes, just tried it, but now it fails in "fcntl_helpers.c":

fcntl_helpers.c: In function ‘fadv_dontneed’: 
fcntl_helpers.c:12:50: error: ‘POSIX_FADV_DONTNEED’ undeclared (first use in this function) 
fcntl_helpers.c:12:50: note: each undeclared identifier is reported only once for each function it appears in 
fcntl_helpers.c: In function ‘fadv_noreuse’: 
fcntl_helpers.c:18:47: error: ‘POSIX_FADV_NOREUSE’ undeclared (first use in this function) 
fcntl_helpers.c:19:1: warning: control reaches end of non-void function [-Wreturn-type] 

from nocache.

Feh avatar Feh commented on June 4, 2024

@onlyjob, I included @noushi’s macros in fcntl_helpers.c, too with commit 543351b. However I feel we will see another warning about missing function prototypes. Can you try again, please? Are there kfreebsd live systems available to test this?

from nocache.

onlyjob avatar onlyjob commented on June 4, 2024

I tested branch "fcntl-posix-fadv" and it built successfully on kfreebsd. However then it hanged on test just after cd t; prove -v ..

I could eventually expose my own kfreebsd-i386 VM for you but to do this I need time to put all the necessary configuration in place. Unfortunately time is something that I have in very short supply. :)

from nocache.

Feh avatar Feh commented on June 4, 2024

Never mind. I’ll just install it inside a VM myself. It could take a day, though.

from nocache.

noushi avatar noushi commented on June 4, 2024

dumb question: does kfreebsd actually honor posix_fadvise() ?!
what about the regular freebsd?

from nocache.

Feh avatar Feh commented on June 4, 2024

Regular FreeBSD surely supports this. I will install kfreebsd later and test it out.

For reference, the error messages and the build status are always available on the debian buildd page.

from nocache.

Feh avatar Feh commented on June 4, 2024

So I installed kfreebsd, but already when compiling, I get a warning:

/tmp/cc9oFzFC.o: In function `main':
cachedel.c:(.text+0x1b8): warning: warning: posix_fadvise is not implemented and will always fail

@onlyjob, can you just make it so that the package is not supported in kfreebsd? Because I wouldn’t know how to solve the case of a missing posix_fadvise function…

from nocache.

onlyjob avatar onlyjob commented on June 4, 2024

Thank you for going so far in pursue of this problem.

As long as "nocache" FTBFS on kfreebsd there will be no package available for that platform. I think the best would be to leave as is so at least we will know if/when kfreebsd implement "posix_fadvise"...

We can ignore kfreebsd for package build but I think I like the above option a bit more. What would you prefer?

from nocache.

Feh avatar Feh commented on June 4, 2024

I‘m not a Debian developer. I just thought that a FTBFS might hinder the package entering the distribution. If that’s not the case I agree we should probably leave it, clearly marked “broken“.

from nocache.

Feh avatar Feh commented on June 4, 2024

@noushi, thanks for researching the __POSIX_VISIBLE thing – but like indicated I think I will discard this commit, if that’s okay with you.

from nocache.

noushi avatar noushi commented on June 4, 2024

Hi Julius, Dmitry,

of course, it was mostly a test, so kfreebsd just can't be supported, because it isn't POSIX compliant.
@Feh you should mention this in the README.md .

Ultimately, the package is not broken, and kfreebsd isn't supported.

@onlyjob: you can specify which architectures noncache is to be built for in debian/control, right?

cheers, and thank you both,
Reda

from nocache.

onlyjob avatar onlyjob commented on June 4, 2024

Naturally due to FTBFS package won't be available on broken architecture(s). But build servers will try to build it on every upload and will notify me by email. If it suddenly got fixed I will know. Or if I get annoyed enough with FTBFS emails I can "blacklist" kfreebsd-any to prevent building attempt. I'm not sure what's the best practice in such cases but I reckon it is OK to let it FTBFS.

Thank you very much for checking this issue and sorry for reporting it... Indeed it's should be kfreebsd problem, not yours. I also think it is worth mentioning in README.

from nocache.

Feh avatar Feh commented on June 4, 2024

Thank you very much for checking this issue and sorry for reporting it... Indeed it's should be kfreebsd problem, not yours.

Not a problem. It is an easy fallacy to believe that only because it works on Linux, it’ll work on any POSIX-compliant UNIX system. So I think it’s better to double-check that what you implemented works correctly than prematurely pointing the finger at others.

from nocache.

noushi avatar noushi commented on June 4, 2024

kfreebsd is not POSIX compliant!
:-)

from nocache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.