Bug#712228: Your mail

2016-09-27 Thread Gianfranco Costamagna
Hi

>The built package also builds haskell-asn1-encoding fine with the
>changed compiler.
>
>Please consider using this patch an upload it soon to the archive.
>I can help with test rebuilds if needed.


https://anonscm.debian.org/cgit/pkg-haskell/DHG_packages.git/commit/?id=3354959ffaddb30572e3609841f20a26859323ff
https://anonscm.debian.org/cgit/pkg-haskell/DHG_packages.git/commit/?h=experimental

I committed your patches on both master and experimental, can you please test 
them?

I hope somebody will upload them soon, I don't think it is good to upload right 
now,
since we are in the middle of a transition (as always), and I don't know when 
it will finish.

G.



Bug#712228: Your mail

2016-09-27 Thread Bálint Réczey
Control: tags -1 patch

Hi Gianfranco,

2016-09-25 1:46 GMT+02:00 Bálint Réczey :
> Hi,
>
> 2016-09-11 10:44 GMT+02:00 Gianfranco Costamagna :
>> Hi,
>>
>>>https://patches.ubuntu.com/g/ghc/ghc_7.10.3-9ubuntu1.patch
>>
>>
>> this patch was already committed on ghc 8 branch, and I also committed
>> on the master branch (7.10.3), however, I won't upload it.
>>>An other option would be bootstrapping GHC in Debian with
>>>-fPIC, but I'm not sure if this is viable.
>>
>>
>> that might sound better in the long run, even if it requires probably more
>> effort.
>>
>> I finished the Ubuntu haskell transition without many issues, so I presume
>> this patch is safe for unstable, but I don't feel enough confident because
>> I can't rebuild and NMU stuff in Debian :)
>
> Thank you for working on the transition for Debian, too.
> I have tested the fix and it does not seem to fix the build on Debian
> most probably due
> to missing additional patches to GCC.
>
> The build system needs more changes IMO.
>
> I'll look into passing -fPIC down to all the gcc calls to fix the build.

This approach did not work and is unlikely to work soon:
https://ghc.haskell.org/trac/ghc/wiki/SharedLibraries/PlatformSupport

>
> You can test the new GCC 6, too, by adding the following line to
> sources.list on your test system:
> deb https://people.debian.org/~rbalint/ppa/pie-bindnow pie-bindnow-unstable/

The following patch disables PIE properly for both the current and
patched GCC 6:

--- ghc-7.10.3/debian/rules2016-05-23 14:17:06.0 +0200
+++ ghc-7.10.3/debian/rules2016-09-27 02:39:01.0 +0200
@@ -34,12 +34,11 @@

 GHC=$(firstword $(shell bash -c "type -p ghc"))
 EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)"
-ifeq (s390x,$(DEB_HOST_ARCH))
-  EXTRA_CONFIGURE_FLAGS += \
+EXTRA_CONFIGURE_FLAGS += \
+LDFLAGS=-no-pie CFLAGS=-fno-PIE \
 CONF_CC_OPTS_STAGE2=-fno-PIE \
 CONF_GCC_LINKER_OPTS_STAGE2=-no-pie \
 CONF_LD_LINKER_OPTS_STAGE2=-no-pie
-endif
 BUILD_HADDOCK_DOCS=YES
 DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/

@@ -60,10 +59,9 @@
 ifeq (armel,$(DEB_HOST_ARCH))
 patch -p1 < debian/patches/armel-revert-ghci-fixes.patch
 endif
-ifeq (s390x,$(DEB_HOST_ARCH))
+echo "SRC_HC_OPTS += -optc-fno-PIE -optl-no-pie" >> mk/build.mk
 echo "SRC_CC_OPTS += -fno-PIE" >> mk/build.mk
 echo "SRC_LD_OPTS += -no-pie" >> mk/build.mk
-endif
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 #echo "GhcStage1HcOpts += -DDEBUG" >> mk/build.mk
 #echo "GhcStage2HcOpts += -DDEBUG" >> mk/build.mk


The built package also builds haskell-asn1-encoding fine with the
changed compiler.

Please consider using this patch an upload it soon to the archive.
I can help with test rebuilds if needed.

Cheers,
Balint



Bug#712228: Your mail

2016-09-24 Thread Bálint Réczey
Hi,

2016-09-11 10:44 GMT+02:00 Gianfranco Costamagna :
> Hi,
>
>>https://patches.ubuntu.com/g/ghc/ghc_7.10.3-9ubuntu1.patch
>
>
> this patch was already committed on ghc 8 branch, and I also committed
> on the master branch (7.10.3), however, I won't upload it.
>>An other option would be bootstrapping GHC in Debian with
>>-fPIC, but I'm not sure if this is viable.
>
>
> that might sound better in the long run, even if it requires probably more
> effort.
>
> I finished the Ubuntu haskell transition without many issues, so I presume
> this patch is safe for unstable, but I don't feel enough confident because
> I can't rebuild and NMU stuff in Debian :)

Thank you for working on the transition for Debian, too.
I have tested the fix and it does not seem to fix the build on Debian
most probably due
to missing additional patches to GCC.

The build system needs more changes IMO.

I'll look into passing -fPIC down to all the gcc calls to fix the build.

You can test the new GCC 6, too, by adding the following line to
sources.list on your test system:
deb https://people.debian.org/~rbalint/ppa/pie-bindnow pie-bindnow-unstable/

Cheers,
Balint



Bug#712228: Your mail

2016-09-11 Thread Gianfranco Costamagna
Hi,

>https://patches.ubuntu.com/g/ghc/ghc_7.10.3-9ubuntu1.patch


this patch was already committed on ghc 8 branch, and I also committed
on the master branch (7.10.3), however, I won't upload it.
>An other option would be bootstrapping GHC in Debian with
>-fPIC, but I'm not sure if this is viable.


that might sound better in the long run, even if it requires probably more
effort.


I finished the Ubuntu haskell transition without many issues, so I presume
this patch is safe for unstable, but I don't feel enough confident because
I can't rebuild and NMU stuff in Debian :)

G.



Bug#712228: Your mail

2016-09-10 Thread Balint Reczey
Control: severity -1 important
Control: user bal...@balintreczey.hu
Control: usertags -1 pie-bindnow-20160906
Control: tags -1 patch

Hi,

I'm facing this issue, too, preparing the transition to PIE be
enabled by default on many architectures, like in Ubuntu.

https://wiki.debian.org/Hardening/PIEByDefaultTransition

Ubuntu carries a bigger patch disabling PIE for amd64 and
other architectures where PIE is enabled in GCC by default:

https://patches.ubuntu.com/g/ghc/ghc_7.10.3-9ubuntu1.patch

Please merge the patch to make PIE disabled in d/rules for
the architectures it will be enabled by default in GCC.

The proposed patch for GCC lists all of those architectures
in #835148.

An other option would be bootstrapping GHC in Debian with
-fPIC, but I'm not sure if this is viable.

Thanks,
Balint

PS: Around 70% of the packages which FTBFS with PIE by default
are failing due to this bug thus it would be nice if the fix
could be applied soon.

On Thu, 2 Jan 2014 18:24:48 + (GMT) Gianfranco Costamagna
 wrote:
> Hi Joachim and Thomas,
> 
>  
> this bug [1] seems to be really similar to that one
> https://ghc.haskell.org/trac/ghc/ticket/3668
> 
> maybe somewhere debian is overriding the GHC flags and pie is added?
> Bests,
> 
> Gianfranco