Forums

Html Validator and HTMLpedia forums
It is currently Fri Sep 03, 2010 6:42 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Tue Aug 21, 2007 11:40 pm 
Offline
Site Admin

Joined: Sat Mar 24, 2007 10:17 am
Posts: 96
Hello,

- I took the script
- and will try to change it from group.
-The email thing is not working but I will try too, not sure if I have access to a smtp server.

Anyway, have you still compilation issue ? Take care that
> undefined reference to `NS_CStringGetData'

Is possibly a consequence that you try with Firefox 3.0 since they change the public API declaration.
You have more chance with 1.x or 2.x version.

Regards,

Marc


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Wed Aug 22, 2007 1:34 pm 
Offline

Joined: Wed Mar 28, 2007 10:37 am
Posts: 24
skipper wrote:
I modified the Makefile and Makefile.in like you wrote. The error disappered, but an other error occured. Now I tried your current version 0.841. But the new error occures too:
Code:
c++  -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O -fPIC -shared -Wl,-z,defs -Wl,-h,libnstidy.so -o libnstidy.so  ../tidy/src/access.o ../tidy/src/attrs.o ../tidy/src/istack.o ../tidy/src/parser.o ../tidy/src/tags.o ../tidy/src/entities.o ../tidy/src/lexer.o ../tidy/src/pprint.o ../tidy/src/clean.o ../tidy/src/localize.o ../tidy/src/config.o ../tidy/src/alloc.o ../tidy/src/attrask.o ../tidy/src/attrdict.o ../tidy/src/attrget.o ../tidy/src/buffio.o ../tidy/src/fileio.o ../tidy/src/streamio.o ../tidy/src/tagask.o ../tidy/src/tmbstr.o ../tidy/src/utf8.o ../tidy/src/tidylib.o ../tidy/src/mappedio.o translation.o nsTidy.o nsOpenSP.o diaglog.o links.o SpValid.o nsTidyModule.o       -L../../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl libosp.a  -Wl,--version-script -Wl,../../../build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm   
nsTidy.o: In function `nsTidyImpl::Log(nsACString const&)':
nsTidy.cpp:(.text+0x373): undefined reference to `NS_CStringGetData'
/usr/bin/ld: nsTidy.o: relocation R_X86_64_PC32 against `NS_CStringGetData' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

I have to compile one component with -fPIC. But which component is it and how can i add the -fPIC? Last time this type of error occured I run ./configure --disable-doc-build CXXFLAGS="-O3 -fPIC" to configure opensp. But running ./configure CXXFLAGS="-fPIC" for configuring mozilla is not the solution, because then some other errors occurs while compiling firefox.
[...]
This error above comes with Firefox 2.0.0.6 and yes, it is still unsolved!

mgueury wrote:
[...]
- and will try to change it from group.
[...]
What do you want to say whit this?

_________________
Image


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Fri Aug 24, 2007 1:17 pm 
Offline
Site Admin

Joined: Sat Mar 24, 2007 10:17 am
Posts: 96
I have another idea ! There is something wrong in the c++ command, there is not linking to xpcom in it.
It is not normal.

You should see at least something like -lxpcom or ../../../dist/lib/libxpcomglue_s.a but there is none.

I think I know the issue, extension/tidy/src/Makefile.in is wrong.
Please correct the Makefile and Makefile.in

------------------------------------------------------------------
ifeq ($(OS_ARCH),WINNT)
EXTRA_DSO_LDOPTS = \
$(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) \
else
------------------------------------------------------------------

To (remove the \)

------------------------------------------------------------------
ifeq ($(OS_ARCH),WINNT)
EXTRA_DSO_LDOPTS = \
$(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX)
else
------------------------------------------------------------------

Thanks, I hope it works this time !


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Fri Aug 24, 2007 4:03 pm 
Offline

Joined: Wed Mar 28, 2007 10:37 am
Posts: 24
I made this change. Now I have "../../../dist/lib/libxpcomglue_s.a" and "-lxpcom" in the command, but the error stayed:
Code:
c++  -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -O -fPIC -shared -Wl,-z,defs -Wl,-h,libnstidy.so -o libnstidy.so  ../tidy/src/access.o ../tidy/src/attrs.o ../tidy/src/istack.o ../tidy/src/parser.o ../tidy/src/tags.o ../tidy/src/entities.o ../tidy/src/lexer.o ../tidy/src/pprint.o ../tidy/src/clean.o ../tidy/src/localize.o ../tidy/src/config.o ../tidy/src/alloc.o ../tidy/src/attrask.o ../tidy/src/attrdict.o ../tidy/src/attrget.o ../tidy/src/buffio.o ../tidy/src/fileio.o ../tidy/src/streamio.o ../tidy/src/tagask.o ../tidy/src/tmbstr.o ../tidy/src/utf8.o ../tidy/src/tidylib.o ../tidy/src/mappedio.o translation.o nsTidy.o nsOpenSP.o diaglog.o links.o SpValid.o nsTidyModule.o       ../../../dist/lib/libxpcomglue_s.a -L../../../dist/bin -Wl,-rpath-link,../../../dist/bin -lxpcom -L../../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl libosp.a  -Wl,--version-script -Wl,../../../build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm   
nsTidy.o: In function `nsTidyImpl::Log(nsACString const&)':
nsTidy.cpp:(.text+0x373): undefined reference to `NS_CStringGetData'
/usr/bin/ld: nsTidy.o: relocation R_X86_64_PC32 against `NS_CStringGetData' can not be used when making a shared object; recompile with -fPIC

_________________
Image


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Mon Aug 27, 2007 9:30 am 
Offline
Site Admin

Joined: Sat Mar 24, 2007 10:17 am
Posts: 96
I just got this mail from Matthew L., maybe can you double-check it? I would be very curious to know what he did to get it working ?

Thanks,

Marc

--------------------------------------------------------------------------------
Hello all,

I have compiled a xpi of the latest 0.8.x branch for Linux x86_64. it is
available at:

http://indexof.co.uk/HtmlValidator-0.8.4.1-x86-64/

Changes to get it to compile cleanly are available at:

http://indexof.co.uk/HtmlValidator-0.7.9.5-x86-64/
(the changes don't differ much)

Was compiled on Gentoo-2007.0:

gcc-4.1.2
glibc-2.6.1

Regards,

Matthew L.
--------------------------------------------------------------------------------


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Mon Aug 27, 2007 1:39 pm 
Offline

Joined: Wed Mar 28, 2007 10:37 am
Posts: 24
The xpi file from Matthew L. is working!

I would like to know what he did to compile it.

_________________
Image


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Tue Aug 28, 2007 9:54 pm 
Offline
Site Admin

Joined: Sat Mar 24, 2007 10:17 am
Posts: 96
Got this from Matt

------------------------------------------------------
Hiya Marc,

I basically followed the instructions at:

http://users.skynet.be/mgueury/mozilla/compile.html

Until I hit upon the same problem as Skipper. I patched
extensions/tidy/src/Makefile.in with:

- --- mozilla_tidy_source/mozilla/extensions/tidy/src/Makefile.in
2007-08-16 17:39:28.000000000 +0100
+++ mozilla/extensions/tidy/src/Makefile.in 2007-08-28
14:18:36.000000000 +0100
@@ -34,7 +34,7 @@
MODULE_NAME = nsTidyModule

# XPCOM Glue
- -DEFINES += -DXPCOM_GLUE
+DEFINES += -DMOZILLA_STRICT_API

# ===============
# OpenSP
@@ -86,15 +86,9 @@

XPIDLSRCS = nsITidy.idl

- -# separate libraries linked in.
- -# Todo: In Firefox 2, use $(XPCOM_GLUE_LDOPTS) instead
- -ifeq ($(OS_ARCH),WINNT)
- -EXTRA_DSO_LDOPTS = \
- - $(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) \
- -else
EXTRA_DSO_LDOPTS = \
- - $(XPCOM_GLUE_LDOPTS)
- -endif
+ $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
+ -lxpcom

EXTRA_DSO_LDOPTS += \
$(NSPR_LIBS) \


Made distclean and re-ran the ./configure and make commands and it
compiled cleanly. Carried on with the instructions (altered a few paths
as I wasn't following the exact same layout).

Note: I also built opensp with:
./configure --disable-doc-build CXXFLAGS=-O2 --with-pic

Cheers,

Matt
------------------------------------------------------


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Wed Aug 29, 2007 3:18 pm 
Offline

Joined: Wed Mar 28, 2007 10:37 am
Posts: 24
YEAH! It compiles! Very Happy

I have tested Matthew's changes. There was only one change needed. So here my changes, that I made to compile 0.8.4.1:

1. I modified my mozilla/extensions/tidy/build_all.sh. You can use this script.
Code:
#!/bin/sh

basename="$(basename "$0" || echo "$0")"

run() {
   command=$@
   # Uncommand the next line for debugging this script.
   #echo "$basename: Executing \"${command}\""
   ${command}
   status=$?
   if test $status -ne 0; then
      echo "$basename: Execution of \"${command}\" failed (exit status ${status})"
      echo "$basename: aborted (exit status ${status})"
      exit ${status}
   fi
}

run cd opensp
run libtoolize --copy --force
run chmod +x autoinit.sh
run ./autoinit.sh
export CXXFLAGS="-O3"
run ./configure --disable-doc-build --with-pic
run make
export CXXFLAGS=""
run cd ..

run cp opensp/lib/.libs/libosp.a src
run make
2. I modified mozilla/extensions/tidy/src/Makefile.in:
  • I removed the two lines:
    # XPCOM Glue
    DEFINES += -DXPCOM_GLUE
  • I remove the \ like you postet on 2007-08-24

And then it compiles and works.


I modified tidy_extension/build_xpi.sh. It now looks like
Code:
#!/bin/sh

# Build a XPI file
#
# History :
#   - 15/08/2004 creation
#   - 24/10/2004 unix version
#

# set the var VERSION and change the RDF and JS file
. ./version.sh

if [ "$1" = "WINDOWS" ]; then
  LIB_NAME=nstidy.dll
  POSTFIX=win_$VERSION
else
  OS="$(uname)"
  if [ $OS = "Darwin" ]; then
    echo OS X version
    LIB_NAME=libnstidy.dylib
    POSTFIX=macos_$VERSION
  elif [ $OS = "Linux" ]; then
    LIB_NAME=libnstidy.so
    ARCHITECTURE="$(uname -m)"
    if [ $ARCHITECTURE = "i386" -o $ARCHITECTURE = "i486" -o $ARCHITECTURE = "i686" ]; then
      POSTFIX="linux_$VERSION"
    elif [ $ARCHITECTURE = "x86_64" ]; then
      POSTFIX="linux64_$VERSION"
    else
      POSTFIX="linux_$ARCHITECTURE_$VERSION"
    fi
  fi
  mv xpi/install.js xpi/install.win
  cat xpi/install.win | sed -e "s/nstidy.dll/$LIB_NAME/" > xpi/install.js
  rm xpi/install.win
fi

# ---------------------------------------------------------------
# Common
[...]
  1. The script has a shebang.
  2. The script checks if you use a 32 bit or 64 bit version of Linux and set postfix to "linux" or "linux64"

I subscribed the mailing list. Please send a mail to this list if you release a new version of the extension. Then I will compile the 64 bit Linux version of the extension and send it to you. So that 64 bit Linux users do not have to wait too long for the compiled extension.

When I visited https://addons.mozilla.org/en-US/firefox/addon/249, I had there the green "Install now (Linux)" button. But the button was linked to the 32 bit version of the extension. So please change this or disable the button for the 64 bit Linux users.

_________________
Image


 
 Profile  
 
 Post subject: Re: Can't compile tidy 0.840 under Ubuntu 7.04 x86_64
PostPosted: Mon Mar 31, 2008 10:04 pm 
Offline

Joined: Mon Mar 31, 2008 9:54 pm
Posts: 1
You should follow the instruction bellow: http://users.skynet.be/mgueury/mozilla/compile.html

_________________
Firefox
Firefox Download
Firefox Web Browsers Review


 
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2002, 2006 phpBB Group
[ Time : 0.154s | 14 Queries | GZIP : Off ]