Cannot compile on amd64

Bug #224531 reported by Edgard Pineda
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libflaim (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

First, there is a problem in Makefile that not permits to compile on amd64.
The following lines are missing in Makefile:

ifndef host_native_word_size
        ifneq (,$(findstring amd64,$(HOSTTYPE)))
                host_processor_family = x86
                host_native_word_size = 64
                host_supported_word_sizes = 32 64
        endif
endif

But, when I tried to compile I've got:

# dpkg-buildpackage -rfakeroot -uc -b
...
src/fsysdata.cpp: In function 'RCODE FlmConfig(eFlmConfigTypes, void*, void*)':
src/fsysdata.cpp:1071: error: cast from 'void*' to 'FLMBOOL' loses precision
make[1]: *** [/root/libflaim-4.9.966/build/linux-x86-64/release/lib64/static/obj/fsysdata.o] Error 1

Some hint?

Related branches

Revision history for this message
Edgard Pineda (edgard-pineda) wrote :

I don't know if this a good solution. I modified src/fsysdata.cpp line 1071 putting a double cast:

if( (FLMBOOL)(FLMINT)Value1)

And the code compiled ok. But just and the end of dpkg-buildpackage I got another error:

Installation complete.
make[1]: Leaving directory `/root/libflaim-4.9.966'
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_install --sourcedir=/root/libflaim-4.9.966/debian/tmp
dh_install: libflaim-dev missing files (usr/lib/lib*.a), aborting
make: *** [binary-arch] Error 1
dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2

some new hint?

Revision history for this message
Edgard Pineda (edgard-pineda) wrote :

a ha! when I search for *.a files executing:

# find . -name '*.a'
./debian/tmp/usr/lib64/libflaim.a
./build/linux-x86-64/release/lib64/static/libflaim.a

I see the problem is the directory "lib64". Then I correct the following files:

debian/libflaim-dev.install

    usr/include/*
    usr/lib*/lib*.a
    usr/lib*/pkgconfig/*
    usr/lib*/lib*.so

debian/libflaim.install

    usr/lib*/libflaim.so*

debian/libflaim4.1.install

    usr/lib*/libflaim*.so.*

But then I got following new error :(

dpkg-shlibdeps: warning: debian/libflaim4.1/usr/lib64/libflaim.so.4.1 shouldn't be linked with libdl.so.2 (it uses none of its symbols).
dh_gencontrol
dpkg-gencontrol: error: current host architecture 'amd64' does not appear in package's architecture list (i386)
dh_gencontrol: command returned error code 65280
make: *** [binary-arch] Error 1
dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2

some idea? Now I don't know what can I do....

Revision history for this message
Edgard Pineda (edgard-pineda) wrote :

Whell... after some googling I found the last solution: edit debian/control and add "amd64" at the end of the lines beginning with "Architecture" like this:

Architecture: i386 amd64

yeesss! finaly I got:

../libflaim-dev_4.9.966-0ubuntu1_amd64.deb
../libflaim4.1_4.9.966-0ubuntu1_amd64.deb
../libflaim_4.9.966-0ubuntu1_amd64.changes

Now I have to test all this packages...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libflaim - 4.9.966-0ubuntu3

---------------
libflaim (4.9.966-0ubuntu3) lucid; urgency=low

  * Makefile:
    + Add -fPIC to ccflags, to prevent relocation error when building.
    + Don't call ldconfig in "make install". What a silly idea.
  * debian/rules:
    + Add an ifeq to turn Debian's "amd64" architecture into x86_64 for
      upstream's build system not to choke.
    + Don't ignore "make clean" errors.
    + Call "dh_makeshlibs" before "dh_installdeb", not after.
  * debian/control:
    + No-change bump to Standards 3.8.4.
    + Build on amd64 as well as i386 (LP: #224531)
    + Update Homepage value, and move to proper field rather than inline
      in description.
    + Use binary:Version not Source-Version.
  * debian/libflaim-dev.install:
    + Stop shipping .a file, we live in a land of shared libs.
  * src/fsysdata.cpp:
    + Double-cast Value1 to prevent precision-loss FTBFS. (Thanks to
      Edgard Pineda <email address hidden>)
  * debian/libflaim4.1.postinst:
    + Call ldconfig, as required, on install of shared lib package.
 -- Jo Shields <email address hidden> Thu, 15 Apr 2010 10:14:09 +0100

Changed in libflaim (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.