Re: Install DragonFlyBSD on 32 MB RAM
On Fri, 06 Apr 2012 20:39:54 +0200, v...@ukr.net wrote: Really - if you're making a custom kernel config and are changing options without checking what they do in the source tree - expect things to fail both in the build and while running, and expect to get your hands dirty - which means reading the source and finding out what the options do to the code. I managed to build my custom kernel by adding the string NO_WERROR=yes to the file '/etc/make.conf'. The warning you got pointed to a real issue. It's just that no one had tested USERCONFIG without VISUAL_USERCONFIG. I have fixed it in master (54433ddd790e8ac6a4f1db9b913b1f89da3bb72a). It built fine after that and now my system works with this kernel, but I am still not sure whether such trick is acceptable or not. Could somebody please shortly explain me the reasons for which warnings are treated as errors by default and give some advice on whether I should stick to such mode or not necessarily? It is to catch regressions and things that need fixing. If buildkernel fails on a warning-turned-error after changing the config it is worth reporting in all cases. Another different thing is changing GCC's flags (like, using -O2 instead of -O). This often introduces new warnings which we haven't cleaned our source for (and also don't always want to). This is where you are on your own and (like Chris said) have to expect breakage from -Werror (which can be worked around with NO_WERROR). Sascha
Re: Install DragonFlyBSD on 32 MB RAM
Hello! On Tue, 06 Mar 2012 1:06:12 -0600 Chris Turner c.tur...@199technologies.com wrote: On 03/06/12 05:24, v...@ukr.net wrote: And also, the question about kernel build failure remains - I would appreciate any input on that case as well. Can you build GENERIC with a stock /etc/make.conf? If not, checkout a fresh source tree try a clean build. if so - you'll need to be making your kernel config file available and any build flags used if you want someone to try to fix. This particular error looks to be related to changing the VISUAL_USERCONFIG and can be found fairly simply by checking the file in question at the line where the build fails - the entire function is ifdef'ed out based on this option.. so - looks like this option is required most likely (I'm not 100%) Really - if you're making a custom kernel config and are changing options without checking what they do in the source tree - expect things to fail both in the build and while running, and expect to get your hands dirty - which means reading the source and finding out what the options do to the code. I managed to build my custom kernel by adding the string NO_WERROR=yes to the file '/etc/make.conf'. It built fine after that and now my system works with this kernel, but I am still not sure whether such trick is acceptable or not. Could somebody please shortly explain me the reasons for which warnings are treated as errors by default and give some advice on whether I should stick to such mode or not necessarily? Thanks! Vladimir - v...@ukr.net
Re: Install DragonFlyBSD on 32 MB RAM
On 03/06/12 01:28, Edward M. wrote: On 03/05/2012 10:25 PM, v...@ukr.net wrote: What's the mistake and how can I fix it? try adding it to: /usr/pkg/etc/mk.conf Indeed - you probably also want to choose the more specific PKG_OPTIONS.bind98 version as the 'default options' setting will turn these things off in all packages.
Re: Install DragonFlyBSD on 32 MB RAM
On Mon, 05 Mar 2012 23:28:59 -0800 Edward M. martinezedward...@gmail.com wrote: try adding it to: /usr/pkg/etc/mk.conf Thanks! It helped! Now I can see that the same configuration file is mentioned on the HowToPkgsrc page. But maybe it is worth fixing this page: http://www.dragonflybsd.org/docs/newhandbook/pkgsrc/#index7h3 as well, because that was the place where I learned about the '/etc/mk.conf/ file? By the way, is it a good idea to disable the threads' option when building the applications on the machine with such a small amount of memory as mine has? I'm not sure about the exact meaning of this option - where can I get any description of it (as well as any other options)? And also, the question about kernel build failure remains - I would appreciate any input on that case as well. Thanks again. Vladimir - v...@ukr.net
Re: Install DragonFlyBSD on 32 MB RAM
On 03/06/12 05:24, v...@ukr.net wrote: On Mon, 05 Mar 2012 23:28:59 -0800 But maybe it is worth fixing this page: http://www.dragonflybsd.org/docs/newhandbook/pkgsrc/#index7h3 as well, because that was the place where I learned about the '/etc/mk.conf/ file? Fixed - thanks for the report. Pkgsrc used to default to /etc/mk.conf a while ago but now uses /usr/pkg/etc/mk.conf. The documentation wasn't yet updated. By the way, is it a good idea to disable the threads' option when building the applications on the machine with such a small amount of memory as mine has? I'm not sure about the exact meaning of this option - where can I get any description of it (as well as any other options)? Generally I wouldn't mess with the options unless you're 100% sure you want to disable it. To find out what it does, check the Makefile or options.mk file in the package directory and if it's not well documented, you'll need to see how the options affect the build process and dig in the package's source to see what this implies. The pkgsrc guide is quite good: http://www.netbsd.org/docs/pkgsrc/ and aside from this and the makefiles, perhaps check the CVS history. see also: http://pkgsrc.se for a nice web interface And also, the question about kernel build failure remains - I would appreciate any input on that case as well. Can you build GENERIC with a stock /etc/make.conf? If not, checkout a fresh source tree try a clean build. if so - you'll need to be making your kernel config file available and any build flags used if you want someone to try to fix. This particular error looks to be related to changing the VISUAL_USERCONFIG and can be found fairly simply by checking the file in question at the line where the build fails - the entire function is ifdef'ed out based on this option.. so - looks like this option is required most likely (I'm not 100%) Really - if you're making a custom kernel config and are changing options without checking what they do in the source tree - expect things to fail both in the build and while running, and expect to get your hands dirty - which means reading the source and finding out what the options do to the code. In other words - by continuing down the (unsupported) low memory path, with a custom kernel config, you've essentially become the 'low memory tester / developer' - and so will need to do 'tester/developer like things' if you want to make progress.. Hope this doesn't come across too harshly - the goal isn't to yell but to try and describe what I think is the reality on this thread for whatever that's worth. Cheers good luck! - Chris
Re: Install DragonFlyBSD on 32 MB RAM
Hello! I tried to build a custom kernel for my PC but it failed with this error message: msoft-float /usr/src/sys/platform/pc32/i386/userconfig.c -Werror cc1: warnings being treated as errors /usr/src/sys/platform/pc32/i386/userconfig.c: In function 'introfunc': /usr/src/sys/platform/pc32/i386/userconfig.c:3055: error: no return statement in function returning non-void *** Error code 1 Stop in /usr/obj/usr/src/sys/MYKERNEL. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. So I do not know how to fix it. And one more problem: I tried also to install 'bind98' from sources (although it does not matter what package exactly I want to insall) and performed the following actions: cd /usr/pkgsrc/net/bind98/ bmake show-options and it gave me the following info: These options are enabled by default: inet6 threads These options are currently enabled: inet6 threads You can select which build options to use by setting PKG_DEFAULT_OPTIONS or PKG_OPTIONS.bind98. Then I edited the '/etc/mk.conf' file by adding the string PKG_DEFAULT_OPTIONS =-gtk -threads -inet6 to it and re-run 'bmake show-options', but result was exactly the same: These options are currently enabled: inet6 threads So I do not understand how to change the package options. I tried to do 'export PKG_DEFAULT_OPTIONS=-threads -inet6', but it didn't help either. What's the mistake and how can I fix it? Thanks! Vladimir - v...@ukr.net
Re: Install DragonFlyBSD on 32 MB RAM
On 03/05/2012 10:25 PM, v...@ukr.net wrote: These options are enabled by default: inet6 threads These options are currently enabled: inet6 threads You can select which build options to use by setting PKG_DEFAULT_OPTIONS or PKG_OPTIONS.bind98. Then I edited the '/etc/mk.conf' file by adding the string PKG_DEFAULT_OPTIONS =-gtk -threads -inet6 to it and re-run 'bmake show-options', but result was exactly the same: These options are currently enabled: inet6 threads So I do not understand how to change the package options. I tried to do 'export PKG_DEFAULT_OPTIONS=-threads -inet6', but it didn't help either. What's the mistake and how can I fix it? try adding it to: /usr/pkg/etc/mk.conf