[IPOL discuss] Unable to build IPOL demo due to libraries' link order problem in some source codes

Jacques Froment Jacques.Froment at univ-ubs.fr
Mon Sep 15 13:43:27 CEST 2014


Dear Pascal,

 > This is a due to a change of behavior of gcc
 > starting at version 4.7 if I remember well, which does not accept an erroneous
 > order of static libraries at link time.

I'm not sure it's so simple, see what I wrote about gcc versions.

 > I am the author of this package and it says in the README.txt line 27:
 > "Prerequisites: CMake version 2.6 or later"
 > OK, this may not be prominent in the README file, but it is the first line of
 > the "Build" section of this file.

Sorry I didn't see that "cmake" was mentioned in the README.txt file of the
ipol_demo main directory (it is indeed included line 11), the demo tutorial
only needs to be updated (see 1.1. Fulfill system requirements).

Best,
Jacques.

Jacques Froment   (Jacques.Froment at univ-ubs.fr)

Université de Bretagne Sud - LMBA UMR 6205
Centre Y. Coppens, campus de Tohannic
BP 573, F-56017 VANNES, FRANCE
Tél. 0297017138 (+33 297017138)
Fax 0297017175 (+33 297017175)

On 15/09/2014 12:24, Pascal Monasse wrote:
> Dear Jacques,
>
> Do not worry, you are not alone having these problems with a few demos. I
> noticed that a while ago, sorry I did not report it (I just move away the
> offending demos in my build). This is a due to a change of behavior of gcc
> starting at version 4.7 if I remember well, which does not accept an erroneous
> order of static libraries at link time.
>
> Concerning
>> * 97
>> The package cmake is needed but nor this is specified in the README.txt file
>> nor at https://tools.ipol.im/wiki/doc/demo/tutorial/
>
> I am the author of this package and it says in the README.txt line 27:
> "Prerequisites: CMake version 2.6 or later"
> OK, this may not be prominent in the README file, but it is the first line of
> the "Build" section of this file.
>
> Also, it says at
> https://tools.ipol.im/wiki/ref/software_guidelines/#compilation
> "A published software must be compiled by an automated non-interactive build
> procedure with make or cmake."
>
> I agree the demo tutorial is not up to date concerning the required packages.
> I tried updating it with:
> """
> ### 1.1. Fulfill system requirements
>
>      apt-get install wget build-essential cmake
>      apt-get install libtiff5-dev libjpeg-dev libpng-dev libfftw3-dev libgsl0-dev
> libeigen3-dev liblapack-dev libblas-dev
>      apt-get install python python-cherrypy3 python-mako python-imaging
> """
> but the wiki answers "The page you are looking for is temporarily
> unavailable." when I try to save the changes. Miguel, could you fix it?
>
> Best,
> Pascal
>
> On Monday, September 15, 2014 11:41:24 AM Jacques Froment wrote:
>> Dear Miguel,
>>
>> First I hope that this post will be added in the right place in the thread
>> tree, I was not able to reply to your post since I didn't receive his
>> message alone but all messages in the discuss Digest form (I set the Digest
>> Mode off, so probably I will receive individual messages now).
>>
>>   > Any others apart of NL-means?
>>
>> Yes, a lot of app binaries cannot be generated !
>> At the end of my post, I list the first encountered errors and they are all
>> of the following types:
>>
>> - additional libraries such as png, tiff, fftw3f should be placed at the end
>> of the link command;
>> - math library missing (-lm);
>> - cmake package missing (while it is not documented as a needed package);
>> - build failed for unknown reason (no src dir, empty dl dir, no build*.log
>> file).
>>   > Indeed, until some version of the gcc compiler the right order of the
>>   > parameters was not taken into account and flawed arguments compiled
>>   > without any error or warning. Later, the bad ordering of the
>>   > parameters became an error.
>>
>> I am wary of the gcc compiler version question. As I wrote, the libraries'
>> link order does not matter on gcc version 4.7.2 (Debian 4.7.2-5) but it
>> does matter on the older gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5).
>> To perform the link gcc calls /usr/bin/ld, therefore that may be the version
>> number of ld that matters. However, in the above two distributions, the
>> version number reported by ld is the same (2.22). That why I suspect an
>> issue of parameters in the compilation of Gnu binutils, that may be
>> different between Debian and Ubuntu.
>>
>> I am surprised to be the first user who raises the issue of the libraries'
>> link order, since Ubuntu is considered to be the most well-known
>> distribution in the Linux world. Anyway, I think that the only way to solve
>> this problem (as well as the following that are sure to come), is that the
>> IPOL staff checks IPOL codes on different Linux distributions, starting
>> with the most common: Ubuntu.
>> Of course you will understand that if I am willing to help report an error,
>> I can not substitute myself for the IPOL team to exhaustively check all
>> published (as well as submitted) IPOL codes.
>>
>> For now, if you can perform a complete revision of the IPOL demo by checking
>> all points mentioned above, do not hesitate to send it to me so that I
>> would check it on my Ubuntu system.
>>
>> In the following, I put the list of the first errors I have corrected (but
>> the "unknown reason" I don't know how to deal with). I also put in
>> attachment (does the mailing list supports attachments ?) the 460 lines
>> file of the output of the "./demo.py build" run: you may get all
>> problematic app by searching for the "build failed" string.
>>
>> Best,
>> Jacques.
>>
>> Jacques Froment   (Jacques.Froment at univ-ubs.fr)
>>
>> Université de Bretagne Sud - LMBA UMR 6205
>> Centre Y. Coppens, campus de Tohannic
>> BP 573, F-56017 VANNES, FRANCE
>> Tél. 0297017138 (+33 297017138)
>> Fax 0297017175 (+33 297017175)
>>
>> -------------------------------------------------------
>>
>> * cm_fds_mcm_amss
>>
>> Offending line:
>>    gcc -ansi -pedantic -Wall -Werror -Wextra -O3 -ltiff -lm FDS_MCM.o
>> io_tiff_all.o -o mcm To be replaced by
>>    gcc -ansi -pedantic -Wall -Werror -Wextra -O3 -ltiff FDS_MCM.o
>> io_tiff_all.o -o mcm -lm -ltiff
>>
>> * 86
>>
>> Build failed for unknown reason (no src dir, empty dl dir, no build*.log
>> file)
>>
>> * g_gunturk_ap_demosaicking
>>
>> Offending line:
>>    cc -lm -ljpeg -lpng -ltiff dmgunturkcli.o dmgunturk.o dmbilinear.o conv.o
>> imageio.o basic.o -o dmgunturk To be replaced by
>>    cc  dmgunturkcli.o dmgunturk.o dmbilinear.o conv.o imageio.o basic.o -o
>> dmgunturk -lm -ljpeg -lpng -ltiff
>>
>> * 97
>>
>> The package cmake is needed but nor this is specified in the README.txt file
>> nor at https://tools.ipol.im/wiki/doc/demo/tutorial/
>>
>> cat build_Rectify.log
>> Fri, 12 Sep 2014 15:29:32 CEST : cmake -D CMAKE_BUILD_TYPE:string=Release
>> ../src /bin/sh: 1: cmake: not found
>>
>> * 67
>>
>> Same as 86
>>
>> * 68
>>
>> Same as 97
>>
>> * 81
>>
>> Same as 86
>>
>> * bcms_self_similarity_driven_demosaicking
>>
>> Offending line:
>>    g++ -g -g -O3 -funroll-loops -fomit-frame-pointer  -fno-tree-pre
>> -falign-loops -ffast-math -ftree-vectorize  -Weffc++ -pedantic -Wall
>> -Wextra  -Wno-write-strings  -Wno-deprecated    -I/opt/local/include/
>> -I/usr/local/include/ -L/opt/local/lib/ -L/usr/local/lib/ -ltiff  -o
>> ./mosaic  mosaic.o io_tiff.o libAuxiliary.o libdemosaicking.o To be
>> replaced by
>>    g++ -g -g -O3 -funroll-loops -fomit-frame-pointer -fno-tree-pre
>> -falign-loops -ffast-math -ftree-vectorize -Weffc++ -pedantic -Wall -Wextra
>> -Wno-write-strings -Wno-deprecated -I/opt/local/include/
>> -I/usr/local/include/ -L/opt/local/lib/ -L/usr/local/lib/ -o ./mosaic
>> mosaic.o io_tiff.o libAuxiliary.o libdemosaicking.o -ltiff
>>
>> Offending line:
>>    g++ -g -g -O3 -funroll-loops -fomit-frame-pointer  -fno-tree-pre
>> -falign-loops -ffast-math -ftree-vectorize  -Weffc++ -pedantic -Wall
>> -Wextra  -Wno-write-strings  -Wno-deprecated    -I/opt/local/include/
>> -I/usr/local/include/ -L/opt/local/lib/ -L/usr/local/lib/ -ltiff  -o
>> ./demosaickingIpol  demosaickingIpol.o io_tiff.o libAuxiliary.o
>> libdemosaicking.o
>> To be replaced by
>>    g++ -g -g -O3 -funroll-loops -fomit-frame-pointer -fno-tree-pre
>> -falign-loops -ffast-math -ftree-vectorize -Weffc++ -pedantic -Wall -Wextra
>> -Wno-write-strings -Wno-deprecated -I/opt/local/include/
>> -I/usr/local/include/ -L/opt/local/lib/ -L/usr/local/lib/ -o
>> ./demosaickingIpol demosaickingIpol.o io_tiff.o libAuxiliary.o
>> libdemosaicking.o -ltiff
>>
>> Offending line:
>>    g++ -g -g -O3 -funroll-loops -fomit-frame-pointer  -fno-tree-pre
>> -falign-loops -ffast-math -ftree-vectorize  -Weffc++ -pedantic -Wall
>> -Wextra  -Wno-write-strings  -Wno-deprecated    -I/opt/local/include/
>> -I/usr/local/include/ -L/opt/local/lib/ -L/usr/local/lib/ -ltiff  -o
>> ./imgdiff  imgdiff.o io_tiff.o libAuxiliary.o libdemosaicking.o To be
>> replaced by
>>    g++ -g -g -O3 -funroll-loops -fomit-frame-pointer -fno-tree-pre
>> -falign-loops -ffast-math -ftree-vectorize -Weffc++ -pedantic -Wall -Wextra
>> -Wno-write-strings -Wno-deprecated -I/opt/local/include/
>> -I/usr/local/include/ -L/opt/local/lib/ -L/usr/local/lib/ -o ./imgdiff
>> imgdiff.o io_tiff.o libAuxiliary.o libdemosaicking.o -ltiff
>>
>> * ggm_random_phase_texture_synthesis
>>
>> Offending line:
>>    cc -ansi -Wall -Wextra -Werror -O3 -funroll-loops -fomit-frame-pointer -o
>> random_phase_noise -lpng -lfftw3f io_png.o mt.o random_phase_noise_lib.o
>> random_phase_noise.o
>> To be replaced by (note that the math library has to be added)
>> cc -ansi -Wall -Wextra -Werror -O3 -funroll-loops -fomit-frame-pointer -o
>> random_phase_noise io_png.o mt.o random_phase_noise_lib.o
>> random_phase_noise.o -lm -lpng -lfftw3f
>>
>> * 84
>>
>> Same as 86
>>
>> * 26
>>
>> Offending line:
>>    c99 -Wall -Wextra -Werror -O3 -fopenmp -o tvl1flow main.c iio.o -lpng
>> -ljpeg -ltiff To be replaced by
>>    c99 -Wall -Wextra -Werror -O3 -fopenmp -o tvl1flow main.c iio.o -lm -lpng
>> -ljpeg -ltiff
>>
>> * 27
>>
>> Offending line:
>>    cc -o piecewise_equalization io_png.o piecewise_equalization_lib.o
>> piecewise_equalization.o global_equalization.o -lpng To be replaced by
>>    cc -o piecewise_equalization io_png.o piecewise_equalization_lib.o
>> piecewise_equalization.o global_equalization.o -lm -lpng
>>
>> -------------------------------------------------------


More information about the discuss mailing list