[Xorp-hackers] Problems with Mkdir

Ben Greear greearb at candelatech.com
Fri Dec 4 09:52:48 PST 2009


On 12/04/2009 09:47 AM, Bruce Simpson wrote:
> Ben Greear wrote:
>> On 12/04/2009 09:09 AM, Bruce Simpson wrote:
>>> Ben Greear wrote:
>>>> On 12/04/2009 06:28 AM, Bruce Simpson wrote:
>>>>> ...and promptly backed out again, the cure is worse than the disease.
>>>>> :-(
>>>> Well, try compiling it on Linux. The problem happened every time for me
>>>> (first build attempt works, the rest fail until 'obj' is blown away.
>>>>
>>>> Did you try my code as I posted, ie w/out the 'fixups' ?
>>>
>>> I did not -- mkdirs() looked like a mis-spelling of makedirs(), so this
>>> code wouldn't have run anyway.
>>
>> You're right about mkdirs. I changed it to makedirs and it gets
>> farther on Fedora 8 (with your previous patch applied).
>>
>> Now it's complaining about something else:
>>
>> Checking for C library pcap... yes
>> Checking for C function pcap_sendpacket()... yes
>> Checking for C library curses... yes
>> Detected libraries: boost_regex rt resolv crypto dl pcap curses
>> Symlink("/home/greearb/git/xorp.ct/obj/x86_64-unknown-linux-gnu/lib",
>> as "/home/greearb/git/xorp.ct/obj/x86_64-unknown-linux-gnu/lib/xorp/lib")
>> RuntimeError: Unexpected arguments:
>> File "/home/greearb/git/xorp.ct/SConstruct", line 644:
>> env.Dir('$xorp_sbindir').abspath))
>> File "/home/greearb/git/xorp.ct/relpath.py", line 13:
>> raise RuntimeError("Unexpected arguments")
>
> OK, this is good, we know that the monkey-patching works, however the
> replacement implementation of relpath() is too naive.
>
> relpath() is being used here to evaluate RPATHs upfront before they get
> passed down to the SConstructs.
> It is exploiting the fact that if the absolute path of the binary is
> deeper than the lib path, os.path.relpath() (in Python 2.6) will return
> a path of the form ../../lib.
>
> Try this one, it's a bit smarter.

Perhaps a bit farther:

Checking for C library curses... yes
Detected libraries: boost_regex rt resolv crypto dl pcap curses
Symlink("/home/greearb/git/xorp.ct/obj/x86_64-unknown-linux-gnu/lib", as "/home/greearb/git/xorp.ct/obj/x86_64-unknown-linux-gnu/lib/xorp/lib")
OSError: Target does not exist: /usr/local/xorp/lib/xorp/lib:
   File "/home/greearb/git/xorp.ct/SConstruct", line 644:
     env.Dir('$xorp_sbindir').abspath))
   File "/home/greearb/git/xorp.ct/relpath.py", line 12:
     raise OSError, 'Target does not exist: ' + target


>
> Still researching Mkdir() issue.
>
>


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list