Apache OpenOffice (AOO) Bugzilla – Issue 51250
psdk detection
Last modified: 2005-10-25 08:17:12 UTC
Hi, m112 doesn't build here because of: checking which neon to use... internal checking which myspell to use... internal checking which altlinuxhyph to use... internal checking which mythes to use... internal checking for PSDK files... configure: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs are installed or use --with-psdk-home . It worked ok with m111. pavel@drogo:~> cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | head -n 1 C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\pavel@drogo:~> Can I provide more details?
set target
Sorry, there are no lineendings, so the head -n1 didn't work as expected. The following patch should fix this.
Created attachment 27516 [details] Patch for configure.in
Hi Pavel, just to make sure where the NULLs are can you post the output of: pavel@drogo:~> cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | head -n 1 | od -c
OK, the registry entries end with NULL, so the following should work: PSDK_HOME=`cat /proc/registry/.../MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2> /dev/null | head -n 1 | sed 's/\x00.*$//'` Accepting /xHH might not work with every sed, but is ok with cygwins sed.
pavel@drogo:~> cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsof tSDK/InstalledSDKs/*/Install\ Dir|head -n 1|od -c 0000000 C : \ P r o g r a m F i l e s 0000020 \ M i c r o s o f t S D K \ \0 0000040 C : \ P r o g r a m F i l e s 0000060 \ M i c r o s o f t S D K \ \0 0000100 C : \ P r o g r a m F i l e s 0000120 \ M i c r o s o f t S D K \ \0 0000140 C : \ P r o g r a m F i l e s 0000160 \ M i c r o s o f t S D K \ \0 0000200 C : \ P r o g r a m F i l e s 0000220 \ M i c r o s o f t S D K \ \0 0000240 C : \ P r o g r a m F i l e s 0000260 \ M i c r o s o f t S D K \ \0 0000300 pavel@drogo:~>
Hmm, looks like it doesn't work with my sed: pavel@drogo:~> cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/*/Install\ Dir 2>/dev/null | head -n 1 | sed 's/\x00.*$//'; echo C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\C:\Program Files\Microsoft SDK\ pavel@drogo:~> It only eat the final 0, not the zero's in the middle. But this works: pavel@drogo:~> cat /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsof tSDK/InstalledSDKs/*/Install\ Dir 2>/dev/null | sed 's/\x00/\x0a/g'|head -n 1 C:\Program Files\Microsoft SDK\ pavel@drogo:~> But there is another problem: # The 2005 PSDK has a trailing backslash PSDK_HOME=`echo $PSDK_HOME | $SED -n "s/\/$//p"` This make PSDK_HOME empty again.
I currently use the attached patch.
Created attachment 27527 [details] the patch I use now
Created attachment 27542 [details] Slightly different patch
The previous patch uses tr instead of sed for the 00 -> \n transformation. I have a slightly better feeling with this than using an undocumented feature in sed (that only sometimes works ;) ). The problem with the second sed command was somehow the quoting. Using ' instead of " made the original version work but I also prefer the version without -n. Oh, I just see that I kept the p in the second sed expression, it is not needed but doesn't hurt. Pavel: Do you have a build fix CWS at the moment? Otherwise I will create one for this patch.
Committed to vq19.
Please verify
verified.
close issue