how to port the netsurf to visopsys?

General discussion about Visopsys.
ps2013
Posts: 18
Joined: Sat Jan 02, 2016 1:36 pm

how to port the netsurf to visopsys?

Post by ps2013 »

how to port the netsurf to visopsys?
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: how to port the netsurf to visopsys?

Post by andymc »

Hi ps2013, welcome.

I hadn't heard of that web browser before, but it does look like something that is quite port-able.

The problem is that Visopsys doesn't really have a working network stack, yet. That will come in the next major version, 0.9.

However, a browser could probably still be ported in the meantime, and that would be useful for displaying HTML files, including documentation, etc. Then when the network stuff is ready, we would be all ready to go.

Have you tried porting open source products before? I imagine that we would need some kind of Visopsys-specific header files, a layer for interfacing with the Windowing system, and some (possibly stubbed, in the case of networking) C library functions.
ps2013
Posts: 18
Joined: Sat Jan 02, 2016 1:36 pm

Re: how to port the netsurf to visopsys?

Post by ps2013 »

I can't compile Netsurf to Visopsys:
$ gcc browser.c
In file included from browser.c:42:0:
utils/corestrings.h:26:26: фатальная ошибка: libwapcaplet.h: No such file or directory
#include <libwapcaplet.h>
^
компиляция прервана.

This file comes on:
’®¬ ў гбва®©б⢥ E Ё¬ҐҐв ¬ҐвЄг information
‘ҐаЁ©­л© ­®¬Ґа ⮬ : 7C20-F324

‘®¤Ґа¦Ё¬®Ґ Ї ЇЄЁ E:\cygwin64\home\user\ns\netsurf\desktop\libwapcaplet

04.01.2016 21:47 <DIR> .
04.01.2016 21:47 <DIR> ..
11.03.2015 13:34 1я076 COPYING
04.01.2016 21:36 <DIR> include
11.03.2015 13:34 7я933 libwapcaplet.h
11.03.2015 13:34 232 libwapcaplet.pc.in
11.03.2015 13:34 1я447 Makefile
11.03.2015 13:34 2я062 README
04.01.2016 21:36 <DIR> src
04.01.2016 21:36 <DIR> test
7 д ©«®ў 12я845 Ў ©в
5 Ї Ї®Є 123я083я875я840 Ў ©в бў®Ў®¤­®

What to do?

My sources of Netsurf port to Visopsys: https://dropmefiles.com/K46z3
ps2013
Posts: 18
Joined: Sat Jan 02, 2016 1:36 pm

Re: how to port the netsurf to visopsys?

Post by ps2013 »

I think we need to create a kit for easy porting of programs on Visopsys.
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: how to port the netsurf to visopsys?

Post by andymc »

Perhaps, yes.

For now, the best way is probably to put the program you're porting into the Visopsys source tree, under the src/programs directory. Look at (or add to) the Makefile(s) in that tree, and make sure that you're building with the same arguments to GCC. These are needed - to tell GCC the right way to cross-compile a program that will run under Visopsys, and to make it use the correct header files and libraries (for example, startup and runtime code, C library, etc)
ps2013
Posts: 18
Joined: Sat Jan 02, 2016 1:36 pm

Re: how to port the netsurf to visopsys?

Post by ps2013 »

$ make
mkdir -p ../../build/programs
make: *** Нет правила для сборки цели «../../build/system/libraries/crt0.o», требуемой для «../../build/programs/adduser». Останов.
https://dropmefiles.com/qXc9L
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: how to port the netsurf to visopsys?

Post by andymc »

My Russian is not very good, but Google translate suggests that you need to run 'make' from the top level first, so that things like crt0.o (the startup library code) get built first.
ps2013
Posts: 18
Joined: Sat Jan 02, 2016 1:36 pm

Re: how to port the netsurf to visopsys?

Post by ps2013 »

i can't find this
User avatar
andymc
Posts: 589
Joined: Tue Nov 16, 2010 7:20 pm

Re: how to port the netsurf to visopsys?

Post by andymc »

You just go to the top level Visopsys directory (the one with the src subdirectory) and type 'make' there. That builds everything. If you go to src/programs and type 'make' there, without doing the full build first, the libraries don't get built and you would get this error.
ps2013
Posts: 18
Joined: Sat Jan 02, 2016 1:36 pm

Re: how to port the netsurf to visopsys?

Post by ps2013 »

make -C osloader
make[1]: вход в каталог «/home/user/vs/src/osloader»
mkdir -p obj ../../build/system/boot ../../build
nasm -f bin -w+orphan-labels mbr-simple.s -o ../../build/system/boot/mbr.simple
make[1]: nasm: Команда не найдена
Makefile:55: ошибка выполнения рецепта для цели «../../build/system/boot/mbr.simple»
make[1]: *** [../../build/system/boot/mbr.simple] Ошибка 127
make[1]: выход из каталога «/home/user/vs/src/osloader»
Makefile:11: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
Post Reply