Author Topic: Another GCC error I can't seem to fix!  (Read 9441 times)

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Another GCC error I can't seem to fix!
« on: January 08, 2016, 09:14:59 pm »
I'm compiling VirtualBox source and after I get "Linking SUPR3HardenedStatic" I get this  No rule to make target error:
No Rule to  make target 'F:/2.1.4-SUP/src/vbox/HostDrivers/Support/$(PATH_SUPR0)/SUPR0.def' needed by F:/2.1.4-SUP/out/os2.x86/release/obj/SUPR0/SUPR0.lib stop
SUPR0.def is located in F:/2.1.4-SUP/src/vbox/HostDrivers/Support/SUPR0.def
Can anybody tell me how to make the needed target so that GCC can find SUPR0.def?

Thanks for any ideas,  klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #1 on: January 08, 2016, 09:55:34 pm »
What does $PATH_SUPRO expand to?
Also are you using the latest release of kmk? There's one in the experimental repository that 's supposed to contain some fixes for compiling VBox I believe

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #2 on: January 08, 2016, 11:27:32 pm »
Hi Dave, thanks for the reply.
You have hit on the source of the problem I believe! --- (my ignorance of GCC)
I have no idea what, when, or where $PATH_SUPR0 means. Nor do I have any idea how to expand it! Is it something that's supposed to be defined in F:/2.1.4-SUP/include/vbox/com/defs.h? (actually I don't believe there is such a directory and tried unsucessfully to create one like it that would work-- no luck!)
  I've tried everything I can think of the make it possible for GCC to find SUPR0.def including making a new directory for it, putting it in F:/2.1.4-SUP/include and several other places that also didn't work.
I really appreciate any advice you can give me, I'm really "bummed out" over this as it looks like it should be fairly simple to resolve.

thanks  klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #3 on: January 09, 2016, 02:06:52 am »
It's a makefile problem, not GCC problem. Sh uses $ for environment variables instead of %%.
Try grepping your source tree for PATH_SUPRO, namely a line like PATH_SUPRO= and see what it is set to. It's probably set by configure but I don't have the source here.
You could always try editing the makefile as well.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #4 on: January 09, 2016, 03:55:15 am »
Hi Dave, You're last post really got me started on the right track I believe. I'm compiling using GCC 3.3.5 on eCS 2.2 betaII. You were right, looks like its set up in the makefile. Here is the section of the makefile that does it, but I still havn't figured out how or what to change.

#
# SUPR0 - The Ring-0 Import / Thunk library.
#

SUPR0_TEMPLATE      = VBOXR0
ifeq ($(VBOX_LDR_FMT),pe)
 SUPR0_SOURCES     += SUPR0.def
endif
ifeq ($(VBOX_LDR_FMT),lx)
SUPR0_SOURCES      += $$(PATH_SUPR0)/SUPR0.def
$$(PATH_SUPR0)/SUPR0.def: $(PATH_SUB_CURRENT)/SUPR0.def | $$(dir $$@)
   $(SED) -e 's/^[ \t][ \t]*\([gA-Z]\)/    _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
   $(MV) -f $@.tmp $@
endif

I don't understand the double $$'s -- does this make any sense to you?,  or maybe a simplified SUPR0_SOURCES defined by a SET command?

klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #5 on: January 09, 2016, 06:05:13 am »
I'm far from an expert in shell scripting and get lost pretty quick.
This still doesn't look to me to the place where SUPRO_PATH gets set, rather it looks like it just does an adjustment to the def file (sed is the streaming editor) and perhaps puts it somewhere different. Notice that for windows (PE) it doesn't use SUPRO_PATH.
Does the DEF file look like a proper OS/2 one? Windows DEF files are usually a lot simpler at the top.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #6 on: January 11, 2016, 02:23:33 am »
Hi Dave, again you were right. I found this in Config.kmk:

 TEMPLATE_VBoxR0ExtPack = For the ring-0 context extension pack modules.
 TEMPLATE_VBoxR0ExtPack_EXTENDS = VBoxR0
 TEMPLATE_VBoxR0ExtPack_EXTENDS_BY = appending
 TEMPLATE_VBoxR0ExtPack_INST = $(INST_EXTPACK)YouShallOverrideThis/
 TEMPLATE_VBoxR0ExtPack_DEFS = VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R0
 if1of ($(VBOX_LDR_FMT), pe lx)
  TEMPLATE_VBoxR0ExtPack_LIBS = \
   $(PATH_LIB)/VMMR0Imp$(VBOX_SUFF_LIB) \
   $(PATH_LIB)/SUPR0$(VBOX_SUFF_LIB)
 endif

This looks like where it is set,  or at least possibly  "if1of($(VBOX_LDR_FMT),pe lx) " can be changeed to make it recognizable?
Any ideas?   klipp
 

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #7 on: January 11, 2016, 03:16:21 am »
Still doesn't look right. Really I guess I should download the source.
Did you update kmk to the new one in the repository? I think I saw somewhere that they had to update kmk due to an issue building VBox.
If you do update kmk, you should clobber the tree (remove all the obj files etc) and start over.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #8 on: January 11, 2016, 05:01:13 am »
Hi Dave, No I haven't updated kmk for this older version, but I'll do as you suggest. I've been using  what Oracle supplied in their Downloadable sources which has worked fine for the four versions I have sucessfully compiled, I am also working on four newer versions including the latest version 5.0.51 which warns about and refuses to start to compile without the updated version of kmk, -- so I'll be able to copy kmk from  that version that I'm also working on.
  I'll let you know if using the updated kmk made a difference.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: Another GCC error I can't seem to fix!
« Reply #9 on: January 12, 2016, 01:02:40 am »
Well, I tried it and the updated version of kmk will not work with GCC 3.3.5 when trying to compile these older versions of VBox. The updated verson has to be used along with GCC 4.9.2 to compile the newest versions of VBox --- 1.5.0 and newer.
  Back to the drawing boards!ยก!

klipp