Just to follow up explicitly to what Craig said, you should do
something like the following, and make sure there are no errors:

# Clobber
rm -rf sconsbuild
# Make sure everything is up to date
gclient sync --force
# Make sure the scons files were regenerated from the gyp files
gclient runhooks --force

On Fri, Apr 24, 2009 at 4:50 PM, Craig Schlenter
<[email protected]> wrote:
>
> Actually all the targets work ... Steven fixed them all and I just
> hadn't realised that so the hammer app thing and my earlier rambling
> is ignorable. I see from your other mail that you are using the
> tarball though so I'd recommend trying to sync up with the current svn
> trunk. It should all work there. Also you must do the gclient runhooks
> --force thing ...
>
> I might be on #chromium later ... Drop by if you're still having
> trouble. That's easier than trying to solve it here...
>
> --Craig
>
> On 24 Apr 2009, at 15:55, nshah <[email protected]> wrote:
>
>>
>> actully I saw it there but then I was not sure if it needs another
>> condition block for shared_library but before asking you again I
>> wanted to try to build chrome (hammer app) and see if that works as
>> you suggested.
>>
>> Thanks!
>> Nidhi
>>
>> On Apr 24, 9:16 am, Craig Schlenter <[email protected]> wrote:
>>> Hmmm ... actually it seems as if -ldl is present in
>>> third_party/libxml/libxml.gyp ... so take a look if it's there for
>>> you
>>> and run gclient sync if it isn't. Try running gclient runhooks --
>>> force
>>> if none of the other things work. Perhaps your scons files have not
>>> been updated properly.
>>>
>>> --Craig
>>>
>>> On Fri, Apr 24, 2009 at 3:05 PM, Craig Schlenter
>>>
>>> <[email protected]> wrote:
>>>> Hi
>>>
>>>> At some point I had used -ldl in the xml gyp file but then I dropped
>>>> that when I purely
>>>> targeted chrome and not any of the other targets ... in fact I
>>>> haven't
>>>> even tried building
>>>> the other targets for a while so it's quite possible that they won't
>>>> build as shared targets.
>>>
>>>> Try
>>>> hammer app
>>>> and see if that works or add '-ldl' after '-lm' in libxml.gyp near
>>>> the
>>>> xmlcatalog stuff.
>>>
>>>> Thanks!
>>>
>>>> --Craig
>>>
>>>> On Fri, Apr 24, 2009 at 2:26 PM, Dean McNamee <[email protected]>
>>>> wrote:
>>>
>>>>> The obvious fix would be to add -ldl, but I don't see why libxml
>>>>> should be using it...
>>>
>>>>> From a quick peek at the code, I saw xmlmodules.c using dlerror /
>>>>> etc
>>>>> for dynamic module support.  Since libxml is running sandboxed,
>>>>> do we
>>>>> really want dynamic module support?
>>>
>>>>> In specific, it seems like we have LIBXML_MODULES_ENABLED defined
>>>>> in
>>>>> our xmlversion.h...
>>>
>>>>> On Fri, Apr 24, 2009 at 2:18 PM, nshah <[email protected]>
>>>>> wrote:
>>>
>>>>>> This group is very impressive, always so quick in reply!
>>>>>> Thanks for quick reply!
>>>>>> I did hammer --verbose and here is the command if that helps:
>>>
>>>>>> cd /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/
>>>>>> src/base
>>>>>> && ../chrome/tools/build/linux/version.sh
>>>>>> file_version_info_linux.h.version /home/dev/ProgramFiles/v8/home/
>>>>>> chrome-svn/tarball/chromium/src/sconsbuild/Debug/obj/
>>>>>> global_intermediate/base/file_version_info_linux.h
>>>>>> flock /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/
>>>>>> src/
>>>>>> sconsbuild/Debug/linker.lock gcc -o /home/dev/ProgramFiles/v8/
>>>>>> home/
>>>>>> chrome-svn/tarball/chromium/src/sconsbuild/Debug/xmlcatalog -L/
>>>>>> home/
>>>>>> dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>> sconsbuild/
>>>>>> Debug/lib -Wl,-rpath=/home/dev/ProgramFiles/v8/home/chrome-svn/
>>>>>> tarball/
>>>>>> chromium/src/sconsbuild/Debug/lib -m32 -pthread /home/dev/
>>>>>> ProgramFiles/
>>>>>> v8/home/chrome-svn/tarball/chromium/src/sconsbuild/Debug/obj/
>>>>>> third_party/libxml/xmlcatalog.o -Wl,--start-group -lm -lxml2 -
>>>>>> Wl,--end-
>>>>>> group
>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to `dlsym'
>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to `dlerror'
>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to `dlopen'
>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to `dlclose'
>>>>>> collect2: ld returned 1 exit status
>>>>>> scons: *** [/home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>> chromium/
>>>>>> src/sconsbuild/Debug/xmlcatalog] Error 1
>>>>>> gcc -o /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>> chromium/src/
>>>>>> sconsbuild/Debug/obj/third_party/harfbuzz/src/harfbuzz-
>>>>>> tibetan.os -c -
>>>>>> m32 -pthread -march=pentium4 -fno-exceptions -msse2 -mfpmath=sse
>>>>>> -I/
>>>>>> usr/include/freetype2 -O0 -g -fPIC -DCHROMIUM_BUILD -
>>>>>> DTOOLKIT_GTK=1 -
>>>>>> D_DEBUG -I/home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>> chromium/
>>>>>> src/sconsbuild/Debug/obj/third_party/harfbuzz/src -I/home/dev/
>>>>>> ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/third_party/
>>>>>> harfbuzz/src /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>> chromium/src/third_party/harfbuzz/src/harfbuzz-tibetan.c
>>>>>> scons: building terminated because of errors.
>>>
>>>>>> On Apr 24, 7:41 am, Dean McNamee <[email protected]> wrote:
>>>>>>> Looks like it's missing -ldl, but I haven't looked closely.
>>>
>>>>>>> On Fri, Apr 24, 2009 at 12:57 PM, nshah
>>>>>>> <[email protected]> wrote:
>>>
>>>>>>>> hi there,
>>>
>>>>>>>> thanks for working on getting the shared lib of libraries! I was
>>>>>>>> pointed to this work by Evan Martin as well and he pointed me
>>>>>>>> to this
>>>>>>>> (http://codereview.chromium.org/88058). However I am having some
>>>>>>>> difficulty getting it to build and it errors out while building
>>>>>>>> libxml.
>>>
>>>>>>>> ==================================================
>>>>>>>> ...
>>>>>>>> Compiling /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/
>>>>>>>> src/sconsbuild/Debug/obj/third_party/harfbuzz/src/harfbuzz-
>>>>>>>> gsub.os
>>>>>>>> Linking /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/src/
>>>>>>>> sconsbuild/Debug/lib/libxml2.so
>>>>>>>> Linking /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/src/
>>>>>>>> sconsbuild/Debug/xmlcatalog
>>>>>>>> Compiling /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/
>>>>>>>> src/sconsbuild/Debug/obj/third_party/harfbuzz/src/harfbuzz-
>>>>>>>> impl.os
>>>>>>>> Compiling /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/
>>>>>>>> src/sconsbuild/Debug/obj/third_party/harfbuzz/src/harfbuzz-
>>>>>>>> open.os
>>>>>>>> Compiling /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/
>>>>>>>> src/sconsbuild/Debug/obj/third_party/harfbuzz/src/harfbuzz-
>>>>>>>> shaper.os
>>>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to `dlsym'
>>>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to
>>>>>>>> `dlerror'
>>>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to `dlopen'
>>>>>>>> /home/dev/ProgramFiles/v8/home/chrome-svn/tarball/chromium/src/
>>>>>>>> sconsbuild/Debug/lib/libxml2.so: undefined reference to
>>>>>>>> `dlclose'
>>>>>>>> collect2: ld returned 1 exit status
>>>>>>>> scons: *** [/home/dev/ProgramFiles/v8/home/chrome-svn/tarball/
>>>>>>>> chromium/
>>>>>>>> src/sconsbuild/Debug/xmlcatalog] Error 1
>>>>>>>> scons: building terminated because of errors.
>>>>>>>> ===============================================
>>>
>>>>>>>>  Here are the steps that I tried:
>>>
>>>>>>>> a) first I tried to download each patch from patch set 4 and
>>>>>>>> patched
>>>>>>>> the corresponding files  manually. Removed sconsbuild
>>>>>>>> directory and
>>>>>>>> rebuilt. it had the same errors.
>>>
>>>>>>>> I read your instructions in Description section but I did not
>>>>>>>> understand where exactly I need to make changes to exclude and
>>>>>>>> include
>>>>>>>> those files. I looked at all_main.scons and common.gypi. it
>>>>>>>> would be
>>>>>>>> really helpful if you can elaborate on those instructions.
>>>
>>>>>>>> b) I did a get latest with revision 14166 by using following
>>>>>>>> command:
>>>>>>>> CHROMIUM_ROOT$ gclient sync --revision s...@14166
>>>
>>>>>>>> (chromium root = directory that has src directory in it).
>>>
>>>>>>>> Let me know what steps I might be missing. Another point I
>>>>>>>> want to add
>>>>>>>> is that I have followed the instructions in 'Staying Green
>>>>>>>> more of the
>>>>>>>> time' section of getting code on chrome wiki for linux
>>>>>>>> developers, if
>>>>>>>> that matters any.
>>>
>>>>>>>> Thanks,
>>>
>>>>>>>> On Apr 21, 8:21 pm, Steven Knight <[email protected]> wrote:
>>>>>>>>> The gyp build can generate shared libraries on Linux (as of
>>>>>>>>> r14166).
>>>
>>>>>>>>> You can set up to use shared libraries by setting the
>>>>>>>>> GYP_DEFINES variable
>>>>>>>>> as follows:
>>>
>>>>>>>>> $ export GYP_DEFINES='library=shared_library'
>>>>>>>>> $ gclient runhooks --force
>>>
>>>>>>>>> If it's not set when you run "gclient", it will silently
>>>>>>>>> generate .scons
>>>>>>>>> files that build with static libraries, of course, so put it
>>>>>>>>> in your
>>>>>>>>> .profile or .bashrc or whatever suits.
>>>
>>>>>>>>> As an alternative to an environment variable, put the
>>>>>>>>> following text in the
>>>>>>>>> ~/.gyp/include.gypi startup file in your home directory:
>>>
>>>>>>>>> {
>>>>>>>>>   'variables': {
>>>>>>>>>     'library': 'shared_library',
>>>>>>>>>   },
>>>
>>>>>>>>> }
>>>
>>>>>>>>> Note that you *can* build shared and static in the same tree
>>>>>>>>> by switching
>>>>>>>>> back and forth (the shared object files will have a different
>>>>>>>>> suffix), but
>>>>>>>>> the .a and .so files get built in the same sconsbuild/
>>>>>>>>> {Debug,Release}/lib
>>>>>>>>> directory.  This can throw you for a loop if the linker
>>>>>>>>> decides to use an
>>>>>>>>> old .so in preference to the new .a you just built, so it's
>>>>>>>>> safer to clean
>>>>>>>>> things out (at least the lib/ subdirectory, anyway).
>>>
>>>>>>>>>         --SK
>> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to