Trying compiling in minix3 - compilation

I'm using minix3 on VMware Player and i'm having trouble compiling a system call.
I actually tried to see if i can add a simple command in a system call just to see that working and i put a simple printf("my message"); in protect.c file which it is on usr/src/servers/vfs.
I saved it, and tried to compile it with make command while i am on vfs directory.
It says that protect.c is up to date.
I try change a file's owner (protect.c has the chown mode code in it) and i'm waiting as a result my message. Instead it's just run the command correctly without printing my message.
I assume that i did something wrong with compiling and i'm searching for hours over the internet trying to fix it. But the only command that cames repeatedly is make hdboot. I know that this command it's not gonna work because i'm using minix3 as a virtual OS, but i tried it just to confirmed it and as i said didn't work.
Is anyone know anything about compiling in minix3?

IF your problem is indeed with compilation and you've implemented your system call correctly then after making any edits in /usr/src you should call "make install" from /usr/src/releasetools and then call "reboot" to restart minix

Related

Cant run wasm module on cmd. Error: failed to run main module `demo.wasm`

Hi I'm new in programing in general I know just web dev. So I'm interested in develop in rust ussing webassembly wasm, wasmp-pack, webpack, wasi and in this case the runtime demo of wasmtime but Im stuck here and seriously I dont know even where
to look to begin with so, heres the error...
Error: failed to run main module `demo.wasm`
Caused by:
0: failed to read `demo.wasm` to a string
1: The system cannot find the file specified. (os error 2)
wasmtime 0.20.0
Wasmtime WebAssembly Runtime```
Im running
windows 10
using cmd
rustup
Thanks
The syntax I was using its wrong!!!!!
'''demo>wasmtime .\target\wasm32-wasi\debug\demo.wasm'''
'''Hello, world!'''
At the begging it appears that wasmtime needs to be invoke to initialize from the root folder that you installed and the go and run the path
This its a recurring thing for me using cmd to run frameworks programs developed with bash or terminal in mind its hell on windows I hope that this serves well to ALL developers. Young or old, inexperienced or bash users stuck in a windows cmd for the day.
Funny thing if you take that same command and remove wasmtime from the beginning it shows you the actual source code of the module in whatever program you have configure to open wasm files and if you dont have one prompts you an alert that there is not such program bind to the file extension.
So the command works for cmd only and if you notice its all backslashes which its the opposite of bash but wait, not always!
So this is just ANOTHER configuration that happens to work with wamstime. But what is this? Is it regular expressions?
In my case, there where no .wasm file matching the wasmtime first argument.

Getting arm-buildroot-linux-uclibcgnueabihf-gcc: Command not found

I am trying to build Linux for my Raspberry Pi 3.
When I do make, I get the below error.
make[2]: /home/rohit/workplace/rp/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc: Command not found
A little background will help. I am following this link . To summarize this is what I ran.
make raspberrypi3_defconfig
make linux-menuconfig
make
From the error I get that the cross gcc is not available at the path as it should be. But I am not sure what I am missing.
The complete log of the make is pasted here. The output/host/usr/bin folder also doesn't contain arm-buildroot-linux-uclibcgnueabihf-gcc, though it does contain arm-buildroot-linux-uclibcgnueabi-gcc. I have pasted the contents of the folder here.
Please help.
i was having this problem and after a make clean the problem was solved. I think the error was because different toolchains used in different builds. The manual says that is one of the cases that you have to do a make clean

Cygwin error: "child_info_fork::abort: Loaded to different address:"

I am trying to build my software using cygwin-x86(32 bit version) on Windows-7.
Cygwin-x64(64 bit) works perfectly fine on the same machine. I want to build 32-bit executable.
Whenever I try cygwin-x86, I get the following errors:
[main] make 7780 child_info_fork::abort:
C:\cygwin\bin\cygiconv-2.dll: Loaded to different address:
parent(0x440000) != child(0x5F0000) make: fork: Resource temporarily
unavailable
I have checked this thread Cygwin Error
I have already tried everything mentioned in there, but I still continue to face the same issue.
Whenever i try /usr/bin/rebaseall -v or cd /usr/bin && ./rebaseall -v as mentioned in the step 7 of the accepted answer in the above mentioned thread, I get this error:
/usr/x86_64-pc-cygwin/sys-root/usr/bin/cygvtv_stubs-0.dll: skipped
because wrong machine type.
/usr/x86_64-pc-cygwin/sys-root/usr/bin/cygz.dll: skipped because wrong
machine type. Segmentation fault (core dumped)
I get this wrong machine type error for a lot of other .dll's as well.
As mentioned earlier I have cygwin-64 installed on my machine & working as expected. But while running rebaseall it is somehow looking for x86-64-pc-cygwin instead of 32 bit version.
The thread is obsolete.
run /usr/bin/rebase-trigger, close all cygwin processes and run again setup-x86.exe. Also without installing anything will execute a rebase for you.
You can also specify the option full.
Additional note:
The most likely cause of fork problems on 32 bit system are too many programs and libraries installed.
for example:
/usr/x86_64-pc-cygwin/sys-root/usr/bin/cygz.dll
belongs to cygwin64-zlib a cross library for building cygwin64 programs from cygwin32. Do you really need it ? If not, as I suspect, remove all cywgin64 packages .
The problem can also be triggered by an anti-virus program. (I saw it happening with Avast.) You can test if this is the cause by disabling it.
Could also be caused by this update
https://support.microsoft.com/en-us/help/4561616/windows-10-update-kb4561616
You can also kill each of the latest process of ash, dash or bash that was forked, setup.exe will simply skip this script and continue with the rest.
I had to kill about 10-20 of them, mostly in latex postinstall scripts.
For me, the solution was to remove the .new file extention of the libs from c:\cygwin64\bin\
I had the same problem using git. various dlls depending on the git command used where included in the error message stating that it was loaded to "different adress".
In fact a corporate antivirus or a loaded program had probably prevent un update during the rebase phase while installing a new program (git-svn in my case)
some required libraries where not installed but cleverly left in the target with the .new file extention.
I just had to remove the .new extention (and rename the original lib to .old) to solve the problem.
In my case the list of lib involved was:
cygcrypto-1.1.dll
cyggcc_s-seh-1.dll
cygintl-8.dll
cygwin1.dll

How do I compile Minix source code?

I intend to make modifications to the Minix kernel. But before I start, I want to compile it, so that I know any further compilation issues are caused by things that I did.
I have obtained the Minix 3 source code from github, where it is mirrored:
git clone git://github.com/minix3/minix
Now, I wish to compile it before making any modifications to the code. When I do make in src, I get the message
Makefile:109: *** missing separator. Stop.
I tried compiling just the kernel by doing make in src/minix/kernel. In this case, I get the message
Makefile:2: *** missing separator. Stop.
How do I circumvent this problem? How do I compile the Minix source?
Minix building procedure is different. Please read through Crosscompiling MINIX with build.sh and MinixOnARM before trying anything. The Makefile under minix/kernel is not designed in normal as to compile with a simple make command. check if you are able to compile with build.sh tool at the minix/ folder
This is how I do it: After logging in as root I navigate to /usr/src/tools and type in "make new fresh" (no quotations). It then compiles.
If you've made changes and you want Minix to boot to that new image, then do the following: After it finishing compiling it will say "Done." Then type in "shutdown -h now". Then at the next prompt type in "exit". It will then start to reboot. Hit "3" and then Minix will boot to that custom boot image you just made when you did the "make new fresh."

Using scripts in PackageMaker (Mac OS X)

I'm trying to build an install package on Mac for my application(s) (there are two .app-s). One of them is a GUI and the other is an agent (service). The install package must run a script (that's the only way I know it can be done) at the end of the installation, so that the agent would be installed as an agent. There is also a .plist file that is installed in /Library/LaunchAgents, but that's what PackageMaker does automatically (ie without the need of a script).
The problem is that... I can't make the script run. I get "Installation failed" at the end.
I don't know what the problem is. Can somebody please help?
A few more details:
I'm trying to do this at the postflight step (after the installation is done). just a guess... do I need to call my file with the same name (eg. postflight)?
I suppose this is the correct directory and path I have set. After dozens of attempts, in the last one I set as "relative path" the path where the PackageMaker document is (in the same folder I have the script). Is there something important I should know about paths that might cause the problem? (the fact is, however, that the build is successful)
do I have to write something specific to allow the script to be executed? I've got the following script:
MyInstall.sh
with the following contents (without quotes):
"#!/bin/sh
sudo launchctl load /Library/LaunchAgents/com.MyCompany.MyService.plist"
(note that com.Mycompany.MyService.plist is already there - it puts it there on install).
P.S. In some of my attempts to make it work, PackageMaker crushed.
Can anybody PLEASE help?
You can look at the installation log.
When the Installer application is running, go to the Window menu and select Installation Log. This will open a separate log window. In this window, select Display All from the combo box. You will be able to see why your script is failing.
I had such experience myself. And here's what i've found out.
In order for installation to succeed your sript must explicitly return 0(i.e. 'success').
If result of commands in your script is not 0 and you aren't calling
exit 0
as last script sentense, your install will tell you it failed.
If you don't use script's return value and you are sure scrpit works correct - just add 'exit 0' at the last line of script.

Resources