-
Notifications
You must be signed in to change notification settings - Fork 12
Compilation Tips
Below are a few pointers on how to get the various projects within this repository to build outside of the RepairBox environment (which takes care of these steps automatically, through its prepare.sh
script). In most cases, the prepare.sh
script should work on your machine as well, but in the event it doesn't, these instructions might help you to figure out why.
hg clone https://gmplib.org/repo/gmp/ TARGDIR
cd TARGDIR
hg update -r COMMIT-ID
./.bootstrap
automake --add-missing
./configure
make
Fails at linking stage:
libtool: link: gcc -shared -fPIC -DPIC .libs/assert.o .libs/compat.o .libs/errno.o .libs/extract-dbl.o .libs/invalid.o .libs/memory.o .libs/mp_bpl.o .libs/mp_clz_tab.o .libs/mp_dv_tab.o .libs/mp_minv_tab.o .libs/mp_get_fns.o .libs/mp_set_fns.o .libs/version.o .libs/nextprime.o .libs/tal-reent.o mpf/.libs/init.o mpf/.libs/init2.o mpf/.libs/inits.o mpf/.libs/set.o mpf/.libs/set_ui.o mpf/.libs/set_si.o mpf/.libs/set_str.o mpf/.libs/set_d.o mpf/.libs/set_z.o mpf/.libs/iset.o mpf/.libs/iset_ui.o mpf/.libs/iset_si.o mpf/.libs/iset_str.o mpf/.libs/iset_d.o mpf/.libs/clear.o mpf/.libs/clears.o mpf/.libs/get_str.o mpf/.libs/dump.o mpf/.libs/size.o mpf/.libs/eq.o mpf/.libs/reldiff.o mpf/.libs/sqrt.o mpf/.libs/random2.o mpf/.libs/inp_str.o mpf/.libs/out_str.o mpf/.libs/add.o mpf/.libs/add_ui.o mpf/.libs/sub.o mpf/.libs/sub_ui.o mpf/.libs/ui_sub.o mpf/.libs/mul.o mpf/.libs/mul_ui.o mpf/.libs/div.o mpf/.libs/div_ui.o mpf/.libs/cmp.o mpf/.libs/cmp_d.o mpf/.libs/cmp_ui.o mpf/.libs/cmp_si.o mpf/.libs/mul_2exp.o mpf/.libs/div_2exp.o mpf/.libs/abs.o mpf/.libs/neg.o mpf/.libs/set_q.o mpf/.libs/get_d.o mpf/.libs/get_d_2exp.o mpf/.libs/set_dfl_prec.o mpf/.libs/set_prc.o mpf/.libs/set_prc_raw.o mpf/.libs/get_dfl_prec.o mpf/.libs/get_prc.o mpf/.libs/ui_div.o mpf/.libs/sqrt_ui.o mpf/.libs/ceilfloor.o mpf/.libs/trunc.o mpf/.libs/pow_ui.o mpf/.libs/urandomb.o mpf/.libs/swap.o mpf/.libs/fits_sint.o mpf/.libs/fits_slong.o mpf/.libs/fits_sshort.o mpf/.libs/fits_uint.o mpf/.libs/fits_ulong.o mpf/.libs/fits_ushort.o mpf/.libs/get_si.o mpf/.libs/get_ui.o mpf/.libs/int_p.o mpz/.libs/abs.o mpz/.libs/add.o mpz/.libs/add_ui.o mpz/.libs/aorsmul.o mpz/.libs/aorsmul_i.o mpz/.libs/and.o mpz/.libs/array_init.o mpz/.libs/bin_ui.o mpz/.libs/bin_uiui.o mpz/.libs/cdiv_q.o mpz/.libs/cdiv_q_ui.o mpz/.libs/cdiv_qr.o mpz/.libs/cdiv_qr_ui.o mpz/.libs/cdiv_r.o mpz/.libs/cdiv_r_ui.o mpz/.libs/cdiv_ui.o mpz/.libs/cfdiv_q_2exp.o mpz/.libs/cfdiv_r_2exp.o mpz/.libs/clear.o mpz/.libs/clears.o mpz/.libs/clrbit.o mpz/.libs/cmp.o mpz/.libs/cmp_d.o mpz/.libs/cmp_si.o mpz/.libs/cmp_ui.o mpz/.libs/cmpabs.o mpz/.libs/cmpabs_d.o mpz/.libs/cmpabs_ui.o mpz/.libs/com.o mpz/.libs/combit.o mpz/.libs/cong.o mpz/.libs/cong_2exp.o mpz/.libs/cong_ui.o mpz/.libs/divexact.o mpz/.libs/divegcd.o mpz/.libs/dive_ui.o mpz/.libs/divis.o mpz/.libs/divis_ui.o mpz/.libs/divis_2exp.o mpz/.libs/dump.o mpz/.libs/export.o mpz/.libs/fac_ui.o mpz/.libs/fdiv_q.o mpz/.libs/fdiv_q_ui.o mpz/.libs/fdiv_qr.o mpz/.libs/fdiv_qr_ui.o mpz/.libs/fdiv_r.o mpz/.libs/fdiv_r_ui.o mpz/.libs/fdiv_ui.o mpz/.libs/fib_ui.o mpz/.libs/fib2_ui.o mpz/.libs/fits_sint.o mpz/.libs/fits_slong.o mpz/.libs/fits_sshort.o mpz/.libs/fits_uint.o mpz/.libs/fits_ulong.o mpz/.libs/fits_ushort.o mpz/.libs/gcd.o mpz/.libs/gcd_ui.o mpz/.libs/gcdext.o mpz/.libs/get_d.o mpz/.libs/get_d_2exp.o mpz/.libs/get_si.o mpz/.libs/get_str.o mpz/.libs/get_ui.o mpz/.libs/getlimbn.o mpz/.libs/hamdist.o mpz/.libs/import.o mpz/.libs/init.o mpz/.libs/init2.o mpz/.libs/inits.o mpz/.libs/inp_raw.o mpz/.libs/inp_str.o mpz/.libs/invert.o mpz/.libs/ior.o mpz/.libs/iset.o mpz/.libs/iset_d.o mpz/.libs/iset_si.o mpz/.libs/iset_str.o mpz/.libs/iset_ui.o mpz/.libs/jacobi.o mpz/.libs/kronsz.o mpz/.libs/kronuz.o mpz/.libs/kronzs.o mpz/.libs/kronzu.o mpz/.libs/lcm.o mpz/.libs/lcm_ui.o mpz/.libs/lucnum_ui.o mpz/.libs/lucnum2_ui.o mpz/.libs/millerrabin.o mpz/.libs/mod.o mpz/.libs/mul.o mpz/.libs/mul_2exp.o mpz/.libs/mul_si.o mpz/.libs/mul_ui.o mpz/.libs/n_pow_ui.o mpz/.libs/neg.o mpz/.libs/nextprime.o mpz/.libs/out_raw.o mpz/.libs/out_str.o mpz/.libs/perfpow.o mpz/.libs/perfsqr.o mpz/.libs/popcount.o mpz/.libs/pow_ui.o mpz/.libs/powm.o mpz/.libs/powm_sec.o mpz/.libs/powm_ui.o mpz/.libs/pprime_p.o mpz/.libs/random.o mpz/.libs/random2.o mpz/.libs/realloc.o mpz/.libs/realloc2.o mpz/.libs/remove.o mpz/.libs/root.o mpz/.libs/rootrem.o mpz/.libs/rrandomb.o mpz/.libs/scan0.o mpz/.libs/scan1.o mpz/.libs/set.o mpz/.libs/set_d.o mpz/.libs/set_f.o mpz/.libs/set_q.o mpz/.libs/set_si.o mpz/.libs/set_str.o mpz/.libs/set_ui.o mpz/.libs/setbit.o mpz/.libs/size.o mpz/.libs/sizeinbase.o mpz/.libs/sqrt.o mpz/.libs/sqrtrem.o mpz/.libs/sub.o mpz/.libs/sub_ui.o mpz/.libs/swap.o mpz/.libs/tdiv_ui.o mpz/.libs/tdiv_q.o mpz/.libs/tdiv_q_2exp.o mpz/.libs/tdiv_q_ui.o mpz/.libs/tdiv_qr.o mpz/.libs/tdiv_qr_ui.o mpz/.libs/tdiv_r.o mpz/.libs/tdiv_r_2exp.o mpz/.libs/tdiv_r_ui.o mpz/.libs/tstbit.o mpz/.libs/ui_pow_ui.o mpz/.libs/ui_sub.o mpz/.libs/urandomb.o mpz/.libs/urandomm.o mpz/.libs/xor.o mpq/.libs/abs.o mpq/.libs/aors.o mpq/.libs/canonicalize.o mpq/.libs/clear.o mpq/.libs/clears.o mpq/.libs/cmp.o mpq/.libs/cmp_si.o mpq/.libs/cmp_ui.o mpq/.libs/div.o mpq/.libs/get_d.o mpq/.libs/get_den.o mpq/.libs/get_num.o mpq/.libs/get_str.o mpq/.libs/init.o mpq/.libs/inits.o mpq/.libs/inp_str.o mpq/.libs/inv.o mpq/.libs/md_2exp.o mpq/.libs/mul.o mpq/.libs/neg.o mpq/.libs/out_str.o mpq/.libs/set.o mpq/.libs/set_den.o mpq/.libs/set_num.o mpq/.libs/set_si.o mpq/.libs/set_str.o mpq/.libs/set_ui.o mpq/.libs/equal.o mpq/.libs/set_z.o mpq/.libs/set_d.o mpq/.libs/set_f.o mpq/.libs/swap.o mpn/.libs/fib_table.o mpn/.libs/mp_bases.o mpn/.libs/invert_limb_table.o mpn/.libs/add.o mpn/.libs/add_1.o mpn/.libs/add_n.o mpn/.libs/sub.o mpn/.libs/sub_1.o mpn/.libs/sub_n.o mpn/.libs/addcnd_n.o mpn/.libs/subcnd_n.o mpn/.libs/neg.o mpn/.libs/com.o mpn/.libs/mul_1.o mpn/.libs/addmul_1.o mpn/.libs/submul_1.o mpn/.libs/lshift.o mpn/.libs/rshift.o mpn/.libs/dive_1.o mpn/.libs/diveby3.o mpn/.libs/divis.o mpn/.libs/divrem.o mpn/.libs/divrem_1.o mpn/.libs/divrem_2.o mpn/.libs/fib2_ui.o mpn/.libs/mod_1.o mpn/.libs/mod_34lsub1.o mpn/.libs/mode1o.o mpn/.libs/pre_mod_1.o mpn/.libs/dump.o mpn/.libs/mod_1_1.o mpn/.libs/mod_1_2.o mpn/.libs/mod_1_3.o mpn/.libs/mod_1_4.o mpn/.libs/lshiftc.o mpn/.libs/mul.o mpn/.libs/mul_fft.o mpn/.libs/mul_n.o mpn/.libs/sqr.o mpn/.libs/mul_basecase.o mpn/.libs/sqr_basecase.o mpn/.libs/nussbaumer_mul.o mpn/.libs/random.o mpn/.libs/random2.o mpn/.libs/pow_1.o mpn/.libs/rootrem.o mpn/.libs/sqrtrem.o mpn/.libs/get_str.o mpn/.libs/set_str.o mpn/.libs/scan0.o mpn/.libs/scan1.o mpn/.libs/popcount.o mpn/.libs/hamdist.o mpn/.libs/cmp.o mpn/.libs/perfsqr.o mpn/.libs/perfpow.o mpn/.libs/gcd_1.o mpn/.libs/gcd.o mpn/.libs/gcdext_1.o mpn/.libs/gcdext.o mpn/.libs/gcd_subdiv_step.o mpn/.libs/gcdext_lehmer.o mpn/.libs/div_q.o mpn/.libs/tdiv_qr.o mpn/.libs/jacbase.o mpn/.libs/jacobi_lehmer.o mpn/.libs/get_d.o mpn/.libs/matrix22_mul.o mpn/.libs/matrix22_mul1_inverse_vector.o mpn/.libs/hgcd2.o mpn/.libs/hgcd.o mpn/.libs/mullo_n.o mpn/.libs/mullo_basecase.o mpn/.libs/toom22_mul.o mpn/.libs/toom32_mul.o mpn/.libs/toom42_mul.o mpn/.libs/toom52_mul.o mpn/.libs/toom62_mul.o mpn/.libs/toom33_mul.o mpn/.libs/toom43_mul.o mpn/.libs/toom53_mul.o mpn/.libs/toom63_mul.o mpn/.libs/toom44_mul.o mpn/.libs/toom6h_mul.o mpn/.libs/toom6_sqr.o mpn/.libs/toom8h_mul.o mpn/.libs/toom8_sqr.o mpn/.libs/toom_couple_handling.o mpn/.libs/toom2_sqr.o mpn/.libs/toom3_sqr.o mpn/.libs/toom4_sqr.o mpn/.libs/toom_eval_dgr3_pm1.o mpn/.libs/toom_eval_dgr3_pm2.o mpn/.libs/toom_eval_pm1.o mpn/.libs/toom_eval_pm2.o mpn/.libs/toom_eval_pm2exp.o mpn/.libs/toom_eval_pm2rexp.o mpn/.libs/toom_interpolate_5pts.o mpn/.libs/toom_interpolate_6pts.o mpn/.libs/toom_interpolate_7pts.o mpn/.libs/toom_interpolate_8pts.o mpn/.libs/toom_interpolate_12pts.o mpn/.libs/toom_interpolate_16pts.o mpn/.libs/invertappr.o mpn/.libs/invert.o mpn/.libs/binvert.o mpn/.libs/mulmod_bnm1.o mpn/.libs/sqrmod_bnm1.o mpn/.libs/div_qr_2.o mpn/.libs/div_qr_2n_pi1.o mpn/.libs/div_qr_2u_pi1.o mpn/.libs/sbpi1_div_q.o mpn/.libs/sbpi1_div_qr.o mpn/.libs/sbpi1_divappr_q.o mpn/.libs/dcpi1_div_q.o mpn/.libs/dcpi1_div_qr.o mpn/.libs/dcpi1_divappr_q.o mpn/.libs/mu_div_qr.o mpn/.libs/mu_divappr_q.o mpn/.libs/mu_div_q.o mpn/.libs/bdiv_q_1.o mpn/.libs/sbpi1_bdiv_q.o mpn/.libs/sbpi1_bdiv_qr.o mpn/.libs/dcpi1_bdiv_q.o mpn/.libs/dcpi1_bdiv_qr.o mpn/.libs/mu_bdiv_q.o mpn/.libs/mu_bdiv_qr.o mpn/.libs/bdiv_q.o mpn/.libs/bdiv_qr.o mpn/.libs/divexact.o mpn/.libs/bdiv_dbm1c.o mpn/.libs/redc_1.o mpn/.libs/redc_2.o mpn/.libs/redc_n.o mpn/.libs/powm.o mpn/.libs/powlo.o mpn/.libs/powm_sec.o mpn/.libs/redc_1_sec.o mpn/.libs/trialdiv.o mpn/.libs/remove.o mpn/.libs/and_n.o mpn/.libs/andn_n.o mpn/.libs/nand_n.o mpn/.libs/ior_n.o mpn/.libs/iorn_n.o mpn/.libs/nior_n.o mpn/.libs/xor_n.o mpn/.libs/xnor_n.o mpn/.libs/copyi.o mpn/.libs/copyd.o mpn/.libs/zero.o mpn/.libs/invert_limb.o mpn/.libs/mul_2.o mpn/.libs/addmul_2.o mpn/.libs/addlsh1_n.o mpn/.libs/sublsh1_n.o mpn/.libs/rsblsh1_n.o mpn/.libs/rsh1add_n.o mpn/.libs/rsh1sub_n.o mpn/.libs/addlsh2_n.o mpn/.libs/rsblsh2_n.o mpn/.libs/addlsh_n.o mpn/.libs/rsblsh_n.o mpn/.libs/add_n_sub_n.o mpn/.libs/addaddmul_1msb0.o printf/.libs/asprintf.o printf/.libs/asprntffuns.o printf/.libs/doprnt.o printf/.libs/doprntf.o printf/.libs/doprnti.o printf/.libs/fprintf.o printf/.libs/obprintf.o printf/.libs/obvprintf.o printf/.libs/obprntffuns.o printf/.libs/printf.o printf/.libs/printffuns.o printf/.libs/snprintf.o printf/.libs/snprntffuns.o printf/.libs/sprintf.o printf/.libs/sprintffuns.o printf/.libs/vasprintf.o printf/.libs/vfprintf.o printf/.libs/vprintf.o printf/.libs/vsnprintf.o printf/.libs/vsprintf.o printf/.libs/repl-vsnprintf.o scanf/.libs/doscan.o scanf/.libs/fscanf.o scanf/.libs/fscanffuns.o scanf/.libs/scanf.o scanf/.libs/sscanf.o scanf/.libs/sscanffuns.o scanf/.libs/vfscanf.o scanf/.libs/vscanf.o scanf/.libs/vsscanf.o rand/.libs/rand.o rand/.libs/randclr.o rand/.libs/randdef.o rand/.libs/randiset.o rand/.libs/randlc2s.o rand/.libs/randlc2x.o rand/.libs/randmt.o rand/.libs/randmts.o rand/.libs/rands.o rand/.libs/randsd.o rand/.libs/randsdui.o rand/.libs/randbui.o rand/.libs/randmui.o -O2 -m64 -mtune=k8 -march=k8 -Wl,-soname -Wl,libgmp.so.10 -o .libs/libgmp.so.10.0.1
/usr/bin/ld: mpn/.libs/invert_limb.o: relocation R_X86_64_PC32 against protected symbol `__gmpn_invert_limb_table' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
svn co https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC fbc
cd fbc
svn update -r COMMIT-ID
./install.sh -u
pushd src/compiler/obj/linux
cd gfxlib2
./configure --host=i686-linux-pc-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
Compiles successfully, but fails to find libncurses.so.5
.
Fails to build from a freshly created source, seemingly due to aclocal incompatibilities. The original ManyBugs gzip scripts will fail to replicate outside the ManyBugs VM, due to an absolute path in tests/Makefile
. A fix for this behaviour is provided in prepare.sh
, which should allow the test suite to execute correctly on your machine.
A few of the libtiff benchmarks fail to build on modern systems due to libtool incompatibilities. To get around this, the following commands can be executed:
cd src
sed -i "s#ACLOCAL_AMFLAGS = -I ./m4#ACLOCAL_AMFLAGS = -I m4#g" Makefile.in
sed -i "s#ACLOCAL_AMFLAGS = -I ./m4#ACLOCAL_AMFLAGS = -I m4#g" Makefile.am
sed -i "s#ACLOCAL_AMFLAGS = -I ./m4#ACLOCAL_AMFLAGS = -I m4#g" Makefile
rm -f aclocal.m4
aclocal
libtoolize --force --copy
automake --add-missing
autoreconf
./configure
make
git clone https://github.com/vadz/libtiff
git reset --hard COMMIT-ID