Discussion:
OBNC - a new Oberon compiler
(too old to reply)
miasap
2017-05-02 14:50:07 UTC
Permalink
Hi everyone,

I have just released a compiler for the Oberon programming language
called OBNC. It is released under the GNU General Public License.
Please, try it out!

http://miasap.se/obnc/


Best regards,

Karl
f***@gmail.com
2017-05-29 16:08:22 UTC
Permalink
Hi Karl,

it's great !

I would like to try it on Window 10 (worked some years with Modula 2)

so is there a chance to create the compiler for Windows 10

with a short TODO ?

Best regards,
Friedhold
miasap
2017-05-29 19:01:58 UTC
Permalink
Post by f***@gmail.com
Hi Karl,
it's great !
I would like to try it on Window 10 (worked some years with Modula 2)
so is there a chance to create the compiler for Windows 10
with a short TODO ?
I'm glad to hear you like it. I haven't tried to build OBNC on Windows
yet (I run Debian on all my machines). If you have the Windows Subsystem
for Linux, Cygwin or MinGW on your computer you should be able to
compile OBNC from source. If you experience any problems, please let us
know.

Regards,
Karl
f***@gmail.com
2017-05-31 10:22:30 UTC
Permalink
Post by miasap
Post by f***@gmail.com
Hi Karl,
it's great !
I would like to try it on Window 10 (worked some years with Modula 2)
so is there a chance to create the compiler for Windows 10
with a short TODO ?
I'm glad to hear you like it. I haven't tried to build OBNC on Windows
yet (I run Debian on all my machines). If you have the Windows Subsystem
for Linux, Cygwin or MinGW on your computer you should be able to
compile OBNC from source. If you experience any problems, please let us
know.
Regards,
Karl
Hi Karl,
thanks, I have not experience with MinGW (new projects) - only used it with 'ready TODO's' yet. It would save me some time if I get a short TODO (from the beginning) , I have installed MinGW TDM-GCC-64 - it works in NetBeans & C++ for me.

Thanks again,
regards
Friedhold
miasap
2017-05-31 15:39:38 UTC
Permalink
Hi Karl, thanks, I have not experience with MinGW (new projects) -
only used it with 'ready TODO's' yet. It would save me some time if I
get a short TODO (from the beginning) , I have installed MinGW
TDM-GCC-64 - it works in NetBeans & C++ for me.
1. Install the garbage collector GC (http://www.hboehm.info/gc). Sorry,
but I can't help you with the exact details here. Maybe you can find a
pre-compiled version.

2. Download the latest version of OBNC from http://miasap.se/obnc
(currently 0.6.4) and store the tarball in /usr/local/src in the MinGW
installation (or use some other directory of your choice).

3. In a MinGW terminal window, go to the source directory (cd
/usr/local/src) and extract the archive with the command

tar xf obnc_0.6.4.tar.gz

4. Enter the package directory:

cd obnc_0.6.4

5. Follow the instructions in the README file (run build, test and install)


-- Karl
Bruce Axtens
2017-06-08 02:44:25 UTC
Permalink
No, still got this weird Invalid cross-device link message.

***@BUGMAGNET-i7-ASUS:~/obnc/obnc-libstd-0.2.0# export
PATH=~/obnc/obnc-0.6.4/bin:$PATH
***@BUGMAGNET-i7-ASUS:~/obnc/obnc-libstd-0.2.0# ./build
cd /root/obnc/obnc-libstd-0.2.0/std
obnc ArgsTest.obn
obnc-compile: error: Cannot move file /tmp/stdArgs.c.51 to
.obnc/stdArgs.c: Invalid cross-device link
Bruce Axtens
2017-06-08 05:38:11 UTC
Permalink
Post by Bruce Axtens
No, still got this weird Invalid cross-device link message.
PATH=~/obnc/obnc-0.6.4/bin:$PATH
cd /root/obnc/obnc-libstd-0.2.0/std
obnc ArgsTest.obn
obnc-compile: error: Cannot move file /tmp/stdArgs.c.51 to
.obnc/stdArgs.c: Invalid cross-device link
Ok, changed my TMPDIR (after looking in the source). With 'export
TMPDIR=~' it works fine.

Bruce
miasap
2017-06-09 09:34:37 UTC
Permalink
Post by Bruce Axtens
Post by Bruce Axtens
No, still got this weird Invalid cross-device link message.
PATH=~/obnc/obnc-0.6.4/bin:$PATH
cd /root/obnc/obnc-libstd-0.2.0/std
obnc ArgsTest.obn
obnc-compile: error: Cannot move file /tmp/stdArgs.c.51 to
.obnc/stdArgs.c: Invalid cross-device link
Ok, changed my TMPDIR (after looking in the source). With 'export
TMPDIR=~' it works fine.
I searched for the error message and it seams to occur in some
situations when the source and destination directory are on different
partitions or hard drives. I will try to come up with a solution.

Regards,
Karl
miasap
2017-07-11 06:56:38 UTC
Permalink
Post by Bruce Axtens
No, still got this weird Invalid cross-device link message.
PATH=~/obnc/obnc-0.6.4/bin:$PATH
cd /root/obnc/obnc-libstd-0.2.0/std
obnc ArgsTest.obn
obnc-compile: error: Cannot move file /tmp/stdArgs.c.51 to
.obnc/stdArgs.c: Invalid cross-device link
This problem should be resolved in OBNC 0.6.8. The temporary files are
now written to the output directory `.obnc'.

http://miasap.se/obnc/


Regards,
Karl
h***@dds.nl
2017-07-21 11:00:57 UTC
Permalink
Post by miasap
Hi everyone,
I have just released a compiler for the Oberon programming language
called OBNC. It is released under the GNU General Public License.
Please, try it out!
http://miasap.se/obnc/
Best regards,
Karl
Hi Karl,

I like it! Under Linux Mint the installation procedure worked as expected. I especially like the clear documentation and the easy way one can get started to compile and run Oberon-07 programs.

I also tried to get it installed and running under macOS Sierra (10.12.5).
Installing the BDW garbage collector and the SDL framework is done a bit differently under macOS.
apt install libgc-dev libsdl1.2-dev
or
apt-get install libgc-dev libsdl1.2-dev
didn't work. I got messages like "Couldn't find package libgc-dev".

For libgc this worked:
brew install bdw-gc
So you will have to install the homebrew package manager first (https://brew.sh/ ).

Also installed SDL1.2 for macOS:
- downloaded SDL-1.2.15.dmg from http://www.libsdl.org/download-1.2.php
- copied the file SDL.framework to /Library/Frameworks

After this ./build worked correctly.
But ./test gave the following messages:
cd /Users/hk/Downloads/obnc-0.7.1/src
./MapsTest
./test: line 27: 6514 Segmentation fault: 11 ./MapsTest

Then ./install seems to work correctly. Everything gets intstalled as far as I can see. But when trying to compile hello.obn with
obnc hello.obn
Nothing seems to happen, no error message, no compilation.

Could you suggest something to make obnc work under macOS?

Thanks,

Hans Klaver
miasap
2017-07-25 10:15:37 UTC
Permalink
Post by h***@dds.nl
I like it! Under Linux Mint the installation procedure worked as
expected. I especially like the clear documentation and the easy way one
can get started to compile and run Oberon-07 programs.
That's really nice to hear.
Post by h***@dds.nl
I also tried to get it installed and running under macOS Sierra (10.12.5).
Installing the BDW garbage collector and the SDL framework is done a bit differently under macOS.
apt install libgc-dev libsdl1.2-dev
or
apt-get install libgc-dev libsdl1.2-dev
didn't work. I got messages like "Couldn't find package libgc-dev".
brew install bdw-gc
So you will have to install the homebrew package manager first (https://brew.sh/ ).
- downloaded SDL-1.2.15.dmg from http://www.libsdl.org/download-1.2.php
- copied the file SDL.framework to /Library/Frameworks
After this ./build worked correctly.
cd /Users/hk/Downloads/obnc-0.7.1/src
./MapsTest
./test: line 27: 6514 Segmentation fault: 11 ./MapsTest
If you have the debugger GDB you can compile OBNC with debugging
information:

./build clean
CFLAGS=-g ./build

Then go to the source directory and build the unit test module for Maps:

cd src/
../bin/micb MapsTest.c

Now, run the debugger to get a backtrace:

gdb MapsTest
(gdb) run
(gdb) backtrace

What does it say?
Post by h***@dds.nl
Then ./install seems to work correctly. Everything gets intstalled as
far as I can see. But when trying to compile hello.obn with obnc
hello.obn Nothing seems to happen, no error message, no compilation.
Probably caused by a segmentation fault in a subcommand related to the
issue above.

Regards,
Karl
h***@dds.nl
2017-07-28 18:12:34 UTC
Permalink
On Tuesday, 25 July 2017 12:15:38 UTC+2, miasap wrote:
(...)
Post by miasap
Post by h***@dds.nl
After this ./build worked correctly.
cd /Users/hk/Downloads/obnc-0.7.1/src
./MapsTest
./test: line 27: 6514 Segmentation fault: 11 ./MapsTest
If you have the debugger GDB you can compile OBNC with debugging
./build clean
CFLAGS=-g ./build
cd src/
../bin/micb MapsTest.c
gdb MapsTest
(gdb) run
(gdb) backtrace
What does it say?
Post by h***@dds.nl
Then ./install seems to work correctly. Everything gets intstalled as
far as I can see. But when trying to compile hello.obn with obnc
hello.obn Nothing seems to happen, no error message, no compilation.
Probably caused by a segmentation fault in a subcommand related to the
issue above.
Had to install GDB first, which was a bit adventurous (had to make a certificate in the process). But I managed. Then proceded as you indicated.

This is the output:

(...)
Reading symbols from MapsTest...done.
(gdb) run
Starting program: /Users/hk/Downloads/obnc-0.7.1/src/MapsTest
[New Thread 0x1403 of process 1945]
warning: unhandled dyld version (15)

Thread 2 received signal SIGSEGV, Segmentation fault.
0x000000010009fc12 in ?? ()
(gdb) backtrace
#0 0x000000010009fc12 in ?? ()
#1 0x0000000000000004 in ?? ()
#2 0x0000000000000000 in ?? ()
(gdb)

Hoping this gives you some clue.

--
Hans Klaver
miasap
2017-08-04 09:02:24 UTC
Permalink
Post by h***@dds.nl
Could you suggest something to make obnc work under macOS?
I have now released OBNC 0.8.0 and Obnc-libstd 0.2.1 which should work
in macOS:

http://miasap.se/obnc/


Regards,
Karl

Loading...