Re: Linker trouble - position independent code(??)

2019-09-26 Thread Brandon Allbery
Generally because n OS update switched to PIE-by-default (LInux
dustributions have been doing this) and ghc needs to be updated or
reconfigured to match.

On Wed, Sep 25, 2019 at 10:06 PM Volker Wysk  wrote:

> Hi!
>
> I've found out how to do it: Use an explicit make rule:
>
> build/% :
> ghc -o $@ $^ -package hsshellscript
>
> But I have no idea why it stopped working...
>
> Happy Hacking,
> V.W.
>
> ___
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>


-- 
brandon s allbery kf8nh
allber...@gmail.com
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


Re: Linker trouble - position independent code(??)

2019-09-25 Thread Volker Wysk
Hi!

I've found out how to do it: Use an explicit make rule:

build/% :
ghc -o $@ $^ -package hsshellscript

But I have no idea why it stopped working...

Happy Hacking,
V.W.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users


Linker trouble - position independent code(??)

2019-09-25 Thread Volker Wysk
Hi!

All of a sudden, I can't link my programs any longer. This affects all
my programs, which I build with a shared Makefile. But I haven't
changed the Makefile...

I get messages like this (indentation by me):

cc build/sicherung.o build/Hsskripte.o build/Sicherung.o 
   build/SicherungAktionen.o build/Text.o build/Wahl.o build/Zeit.o  
   build/hssk.o   -o build/sicherung
/usr/bin/ld: build/sicherung.o: relocation R_X86_64_32S against
   undefined symbol `stg_upd_frame_info' can not be used when making a 
   PIE object; recompile with -fPIC
/usr/bin/ld: build/Hsskripte.o: relocation R_X86_64_32S against
   `.text' can not be used when making a PIE object; recompile with 
   -fPIC
... more like this ...
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: 
In function `_start':
(.text+0x20): undefined reference to `main'
/usr/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status

I've attached the complete build messages.

I've never dealt with position independent code. I've tried that "-
fPIC" switch, but this produces lots of new error messages.

Any idea of what's wrong?

Bye,
V.W.
-*- mode: compilation; default-directory: "~/src/hsskripte/" -*-
Compilation started at Thu Sep 26 03:33:34

LANG=C make -k build/sicherung
ghc -o build/Hsskripte.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build 
src/Hsskripte.hs
ghc -o build/Zeit.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build src/Zeit.hs
ghc -o build/Sicherung.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build 
src/Sicherung.hs
ghc -o build/Text.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build src/Text.hs
ghc -o build/Wahl.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build src/Wahl.hs
ghc -o build/SicherungAktionen.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build 
src/SicherungAktionen.hs
ghc -o build/sicherung.o -c  -ibuild -I. -isrc -XUndecidableInstances 
-fno-warn-deprecations -XScopedTypeVariables -XDeriveDataTypeable 
-XTypeSynonymInstances -XFlexibleInstances -XStandaloneDeriving -package 
regex-compat -package edit-distance -fno-warn-typed-holes -package containers 
-package pretty -package hsshellscript -package text -package bytestring 
-package time -package rfc5051 -static  -odir build -hidir build 
src/sicherung.hs
gcc -o build/hssk.o -c  -O2 src/hssk.c -fPIC
src/hssk.c:16:38: warning: 'struct statfs' declared inside parameter list will 
not be visible outside of this definition or declaration
 int statfs1(const char *path, struct statfs *buf)
  ^~
src/hssk.c: In function 'statfs1':
src/hssk.c:24:9: warning: implicit declaration of function 'statfs'; did you 
mean 'statfs1'? [-Wimplicit-function-declaration]
   erg = statfs(path, buf);
 ^~
 statfs1
cc   build/sicherung.o build/Hsskripte.o build/Sicherung.o