Author Topic: TroubleShoot: Fatal error: Unable to open included file  (Read 91865 times)

Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
TroubleShoot: Fatal error: Unable to open included file
« on: November 14, 2010, 05:26:34 AM »
Hi, I've written an OS out of nasm, called Casnix (http://casnix.sourceforge.net/).
This is my first build of the OS at a finished test version, I just need to see if there's any errors, all the code is written.
I'm using cygwin, and I can compile the boot loader, but when I try to compile the kernel...

Kernel source tree:

kernel.asm
features/
   cli.asm
   basic.asm
   math.asm
   ... (lots of files)

Before I completed the test version, I could compile the kernel, but now:

$ nasm -w+orphan-labels -f bin -o kernel/kernel.bin kernel/kernel.asm

kernel/kernel.asm:360: fatal: unable to open include file 'features/cli.asm'

The file cli.asm does exist in the path that it is included to, and I can't find any code error that would cause this.  What's happening?

-Matthew Caswell

Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #1 on: November 14, 2010, 05:39:51 AM »
Okay, so I was typing in the wrong file name.  The kernel source is 'casnix.asm'.  But still, I get the same error.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #2 on: November 14, 2010, 06:37:41 AM »
Code: [Select]
%include "kernel/features/cli.asm"
; etc.

?

... or "nasm -f bin -o kernel/kernel.bin -Ikernel/ kernel/casnix.asm"?
("orphan-labels" should be "on" by default, with a reasonably recent version of Nasm)

... or build it from the "kernel" directory rather than the one above it?

I suppose I could try this, since you supply code... brb.

Best,
Frank


Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #3 on: November 14, 2010, 06:46:56 AM »
Nope. Not finding any files. There's a reason Nasm has more-or-less abandoned SourceForge. :)

Best,
Frank


Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #4 on: November 14, 2010, 05:27:54 PM »
Okay,  I didn't know about the orphan labels.  But I figured out the problem: Corrupt files/directories.  I fixed it, though.  Thank you.
Part of the time, I'm using nasm versions such as 0.98.36

Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #5 on: November 14, 2010, 07:23:01 PM »
heh, still broken.  Compiling from the kernel directory....

Yeah, that worked.  Thankyou!

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #6 on: November 15, 2010, 04:43:37 PM »
Okay. Nice new main page... but still no files! (No wonder Nasm can't find 'em! :) )

Best,
Frank


Offline macaswell

  • Jr. Member
  • *
  • Posts: 16
Re: TroubleShoot: Fatal error: Unable to open included file
« Reply #7 on: November 16, 2010, 08:16:25 PM »
No, there aren't any files on the page yet, 'cause I'm still adding functionality.