Recent

Author Topic: [solved] big problem with compiling lazarus on x86_64  (Read 5558 times)

Amnon82

  • New Member
  • *
  • Posts: 37
[solved] big problem with compiling lazarus on x86_64
« on: June 07, 2007, 12:02:12 am »
I'm using paldo gnu/linux. After installing the package i686-pc-linux-gnu I can't compile lazarus anymore.

The makefile generates a link.res file with this:

Code: [Select]
SEARCH_DIR(/lib64/)
SEARCH_DIR(/usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.3/)
SEARCH_DIR(/usr/local/lib/)
SEARCH_DIR(/lib/i686-pc-linux-gnu/)
SEARCH_DIR(/usr/lib/i686-pc-linux-gnu/)
...
/usr/lib/i686-pc-linux-gnu/crti.o
...
)
INPUT(
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.3/crtend.o
/usr/lib/i686-pc-linux-gnu/crtn.o
)


crti.o and crtn.o are both 32bit-builds. The 64bit-builds are located in /usr/lib.

how can I prevent makefile to add i686-pc-linux-gnu to the link.res-file?

Must be here:

Code: [Select]
ifneq ($(findstring darwin,$(OSTYPE)),)
inUnix=1 #darwin
SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
else
ifeq ($(findstring ;,$(PATH)),)
inUnix=1
SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
else
SEARCHPATH:=$(subst ;, ,$(PATH))
endif
endif
SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))


and here:

Code: [Select]
endif
endif
ifndef OTHERLIBDIR
OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
endif
endif
ifdef inUnix


... in the makefile. Must be in SEARCHPATH and OTHERLIBDIR ...

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: [link.res] big problem with compiling lazarus on x86_64
« Reply #1 on: June 07, 2007, 07:57:47 am »
Check the fpc.cfg file for -Fl lines and fix them.

Amnon82

  • New Member
  • *
  • Posts: 37
RE: [link.res] big problem with compiling lazarus on x86_64
« Reply #2 on: June 07, 2007, 08:04:30 am »
I checked the file, but there isn't any line with i686-pc-linux-gnu in it. How can I fix it then?

Amnon82

  • New Member
  • *
  • Posts: 37
RE: [link.res] big problem with compiling lazarus on x86_64
« Reply #3 on: June 07, 2007, 08:44:23 am »
found the solution:

Code: [Select]
<archive name="lazarus-$VERSION">
      <!-- disable ld.so.conf - needed cos of i686-pc-linux-gnu-package -->
      <cmd>mv /etc/ld.so.conf /etc/ld.so.disabled</cmd>
      <cmd>echo '/lib' > /etc/ld.so.conf</cmd>
      <cmd>echo '/usr/lib' >> /etc/ld.so.conf</cmd>

      <cmd>cp -a lazarus /opt</cmd>
      <cmd>chmod -R 777 /opt/lazarus</cmd>
      <cmd>cd /opt/lazarus</cmd>
      <cmd>make clean all</cmd>
      <cmd>ln -svf /opt/lazarus/startlazarus /usr/bin/lazarus</cmd>
      <cmd>cd /opt/lazarus/lcl</cmd>
      <cmd>make LCL_PLATFORM=gtk</cmd>
      <cmd>make LCL_PLATFORM=gtk2</cmd>
      <cmd>ln -svf /lib /lib64</cmd>

      <!-- restore ld.so.conf -->
      <cmd>rm /etc/ld.so.conf</cmd>
      <cmd>mv /etc/ld.so.disabled /etc/ld.so.conf</cmd>
</archive>

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: [link.res] big problem with compiling lazarus on x86_64
« Reply #4 on: June 07, 2007, 09:54:27 am »
It seems to me there is something wrong with that ld.so.conf, does it for 32 bits things?

 

TinyPortal © 2005-2018