FS#55170 - [ponyc] Cannot compile simple "Hello World!"
Attached to Project:
Community Packages
Opened by Dario Ostuni (dariost) - Wednesday, 16 August 2017, 18:06 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 21 December 2017, 09:54 GMT
Opened by Dario Ostuni (dariost) - Wednesday, 16 August 2017, 18:06 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 21 December 2017, 09:54 GMT
|
Details
Description:
When trying to compile this simple program: ``` $ cat main.pony actor Main new create(env: Env) => env.out.print("Hello World!") ``` it gives the following error: ``` $ ponyc Building builtin -> /usr/lib/pony/0.17.0/packages/builtin Building . -> /tmp/hw Generating Reachability Selector painting Data prototypes Data types Function prototypes Functions Descriptors Optimising Writing ./hw.o Linking ./hw Warning: environment variable $CC undefined, using cc as the linker /usr/bin/ld.gold: errore: ./hw.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: errore: ./hw.o: requires dynamic R_X86_64_32 reloc against 'pony_personality_v0' which may overflow at runtime; recompile with -fPIC collect2: error: ld returned 1 exit status Error: unable to link: cc -o ./hw -O3 -march=x86-64 -mcx16 -latomic -fuse-ld=gold ./hw.o -L"/usr/lib/pony/0.17.0/bin/" -Wl,-rpath,"/usr/lib/pony/0.17.0/bin/" -L"/usr/lib/pony/0.17.0/bin/../packages" -Wl,-rpath,"/usr/lib/pony/0.17.0/bin/../packages" -L"/usr/local/lib" -Wl,-rpath,"/usr/local/lib" -Wl,--start-group -Wl,--end-group -lpthread -lponyrt -ldl -lm -Wl,--export-dynamic-symbol=__PonyDescTablePtr -Wl,--export-dynamic-symbol=__PonyDescTableSiz ``` Additional info: ponyc version 0.17.0-1 This might be relevant: https://github.com/ponylang/ponyc#arch |
This task depends upon
Closed by Felix Yan (felixonmars)
Thursday, 21 December 2017, 09:54 GMT
Reason for closing: Fixed
Additional comments about closing: 0.21.0-2
Thursday, 21 December 2017, 09:54 GMT
Reason for closing: Fixed
Additional comments about closing: 0.21.0-2
* It need to generating position independent code.
* It needs to explicitly link to openssl 1.0.
I attached a patch that fixed both issues (on my machine).