error make, undefined reference to `htobe32'

Bug #766861 reported by ffsdmad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cuneiform for Linux
Won't Fix
Undecided
Unassigned

Bug Description

[ 98%] Built target rmarker
[100%] Built target cuneiform
Linking CXX executable ../../cuneiform
../Kern/rstr/librstr.so.1.1.0: undefined reference to `htobe32'
collect2: ld returned 1 exit status
make[2]: *** [cuneiform] Error 1
make[1]: *** [cuneiform_src/cli/CMakeFiles/cuneiform-cli.dir/all] Error 2
make: *** [all] Error 2

Tags: htobe32 make
Revision history for this message
ffsdmad (ffsdmad) wrote :

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.2
Release: 8.04
Codename: hardy

uname -a
Linux serv 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686 GNU/Linux

description: updated
Changed in cuneiform-linux:
status: New → Incomplete
ffsdmad (ffsdmad)
Changed in cuneiform-linux:
status: Incomplete → New
Revision history for this message
Yury V. Zaytsev (zyv) wrote :

Is this trunk or latest release?

Revision history for this message
ffsdmad (ffsdmad) wrote : Re: [Bug 766861] Re: error make, undefined reference to `htobe32'

http://launchpad.net/cuneiform-linux/1.1/1.1/+download/cuneiform-linux-1.1.0.tar.bz2

2011/4/20 Yury V. Zaytsev <email address hidden>

> Is this trunk or latest release?
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/766861
>
> Title:
> error make, undefined reference to `htobe32'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/cuneiform-linux/+bug/766861/+subscribe
>

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Your distro is too old. The hto* functions are relatively new and not available in old glibc headers.

If you want to make it work, you have to patch it yourself. Sorry.

Revision history for this message
ffsdmad (ffsdmad) wrote :

added to the definition of a macro function

784 #include <endian.h>
785
786 uint32_t htobe32(uint32_t x) {
787 union { uint32_t u32; uint8_t v[4]; } ret;
788 ret.v[0] = (uint8_t)(x >> 24);
789 ret.v[1] = (uint8_t)(x >> 16);
790 ret.v[2] = (uint8_t)(x >> 8);
791 ret.v[3] = (uint8_t) x;
792 return ret.u32;
793 }
794
795 #define swapbytes(a) do { (a) = htobe32(a); } while (0)

all okay, thanks

2011/4/20 JussiP <email address hidden>

> Your distro is too old. The hto* functions are relatively new and not
> available in old glibc headers.
>
> If you want to make it work, you have to patch it yourself. Sorry.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/766861
>
> Title:
> error make, undefined reference to `htobe32'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/cuneiform-linux/+bug/766861/+subscribe
>

Changed in cuneiform-linux:
status: New → Confirmed
status: Confirmed → Incomplete
status: Incomplete → Opinion
Revision history for this message
Wendell Dingus (wendell-bisonline) wrote :

FYI, CentOS 5.6 X86_64, same problem. At first I built without ImageMagick-c++-devel package installed accidentally. It built and worked fine, with only .BMP support though. Added the package, rebuilt, then got the same htobe32 error as described here. Edited cuneiform_src/Kern/rstr/src/perc.c and inserted the lines from comment #5 above and it built clean.

Thanks.

Changed in cuneiform-linux:
status: Opinion → Won't Fix
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.