[vbox-dev] VirtualBox-5.1.20a fails to compile - linux 32-bit

John Frankish john.frankish at outlook.com
Tue May 2 13:10:52 GMT 2017


>>>> if readelf -S 
>>>> /usr/src/VirtualBox-5.1.20/out/linux.x86/release/obj/tstLdrObjR0/tst
>>>> LdrObjR0.r0|grep -q "[cd]tors"; then echo "Found ctors/dtors in > > 
>>>> /usr/src/VirtualBox-5.1.20/out/linux.x86/release/obj/tstLdrObjR0/tst
>>>> LdrObjR0.r0!"; exit 1; fi
>>>> /etc/init.d/tc-functions: 72: Syntax error: Bad substitution
>>>> kmk: *** 
>>>> [/usr/src/VirtualBox-5.1.20/out/linux.x86/release/obj/tstLdrObjR0/ts
>>>> tLdrObjR0.r0] Error 2
>>>> kmk: *** Deleting file `/usr/src/VirtualBox-5.1.20/out/linux.x86/release/obj/tstLdrObjR0/tstLdrObjR0.r0'
>>>> kmk: *** 
>>>> [/usr/src/VirtualBox-5.1.20/out/linux.x86/release/obj/tstLdrObjR0/tstLdrObjR0.r0]
>>>> Deleting file `/usr/src/VirtualBox- 5.1.20/out/linux.x86/release/obj/tstLdrObjR0/tstLdrObjR0.debug'
>>>>
>>>> I have not been able to fix the one above.
>>>>
>>> you get a lot of
>>>
>>> /etc/init.d/tc-functions: 72: Syntax error: Bad substitution
>>>
>>> I could only find out that this file is related to Tiny Core Linux, 
>>> but not what it does (especially not why the heck it gets executed 
>>> all the time as part of executing kmk recipes - the SHELL variable 
>>> should be pointing to kmk_ash, and I wouldn't see why it would look at this file).
>>>
>>> I suspect that this causes a lot of confusion (and it's very 
>>> obviously totally unrelated to VirtualBox)...
>>>
>> Indeed, the $SHELL variable looks to be the problem:
>>
>> $ echo $PATH
>> /usr/src/VirtualBox-5.1.20/tools/linux.x86/bin:/usr/src/VirtualBox-5.1
>> .20/kBuild/bin/linux.x86:/home/tc/.local/bin:/usr/local/sbin:/usr/loca
>> l/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/sysconfig/tcedir/on
>> demand
>>
>> $ which kmk_ash
>> /usr/src/VirtualBox-5.1.20/kBuild/bin/linux.x86/kmk_ash
>>
>> $ echo $SHELL
>> /bin/sh
>>
>> ..but shouldn't "source ./env.sh" take care of that?
>>
>> What is the best way to set $SHELL, so that "kmk all" works?
>>
> The shell's SHELL variable should play absolutely no role with kmk/kBuild, since it is
> overriding it with kmk_ash (unless the user overrides it explicitly in the command line).
> This seems to work well, except for your setup/system.
>
> I wonder what you get as the output of "kmk -p" (will produce a LOT of output to stdout),
> especially for the SHELL and MAKESHELL variables and the comment line immediately before both.
> They should both be defined by kBuild/header.kmk.
>
kmk -p
...
# makefile (from '/usr/src/VirtualBox-5.1.22/kBuild/header.kmk', line 730)
SHELL := /usr/src/VirtualBox-5.1.22/kBuild/bin/linux.x86/kmk_ash
...
# makefile (from '/usr/src/VirtualBox-5.1.22/kBuild/header.kmk', line 729)
MAKESHELL := /usr/src/VirtualBox-5.1.22/kBuild/bin/linux.x86/kmk_ash

> What's the complete kmk command line you are using?
>
kmk KBUILD_VERBOSE=2 -j1

On my system /bin/sh -> busybox

If I "source ~/.bashrc", this changes $SHELL from /bin/sh -> /bin/bash and things then work without error.

Thanks for the pointers.




More information about the vbox-dev mailing list