tobiaswaldvogel / openwrt-addpack

Additional packages for OpenWRT, mainly NAS devices
71 stars 61 forks source link

Unison - ocaml link phase issues #11

Open dsjstc opened 8 years ago

dsjstc commented 8 years ago

UPDATE: The originally targeted version 2.40.102 doesn't appear to work with a modern openwrt build. It builds the toolchain IPKs (libc and libgcc), but just enters and leaves the feeds/addpack/unison directory without apparently doing anything. Version 2.9.1 fails with a problem related to GDK.

ORIGINAL: The current stable unison 2.48.3 fails due to invalid options being passed to ocamlopt (perhaps due to a top level CFLAGS?). I'm afraid I don't yet understand enough about the openwrt build system to correct this and submit a patched Makefile.

Here is the option list given to ocaml when building native on x64:

Linking unison ! ocamlopt -verbose -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -o unison unix.cmxa ...

But here is the option list when building for my target openwrt:

! ocamlopt -verbose -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -o unison -Os -pipe -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -iremap /home/at/dev/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.12_eabi/unison-2.48.3:unison-2.48.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/at/dev/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.12_eabi/usr/include -I/home/at/dev/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl-1.1.12_eabi/include -I/home/at/dev/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.2.0_musl-1.1.12_eabi/usr/include -I/home/at/dev/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.2.0_musl-1.1.12_eabi/include/fortify -I/home/at/dev/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-5.2.0_musl-1.1.12_eabi/include unix.cmxa