tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Installation


From: David Mertens
Subject: Re: [Tinycc-devel] Installation
Date: Mon, 18 Jul 2016 23:19:48 -0400

Hello Niusha,

I hope you don't mind a dumb-sounding question, but just to make sure we're on the same page: Did "./configure" run correctly? Are you showing the output of this command because this is the step in the make process that failed?

I ask because I've never had to explicitly type the command to compile libtcc.so by hand--and I've investigated this process for a number of systems--so it seems odd that you're doing that.

David

On Mon, Jul 18, 2016 at 2:49 PM, Niyousha D <address@hidden> wrote:
To be more precise, this is the error I get when trying to install tcc:

I have all the requirements installed.

I put the following as said in the "read me" file:
gcc -shared -Wl,-soname,libtcc.so -o libtcc.so libtcc.o

This is the error I get:
/usr/bin/ld: libtcc.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
libtcc.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Then I recompile with -fPIC, this is what I get:
gcc -fPIC -Wl,-soname,libtcc.so -o libtcc.so libtcc.o
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 21
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
libtcc.o: In function `error1':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:574: undefined reference to `file'
libtcc.o: In function `tcc_cleanup':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:873: undefined reference to `free_defines'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:876: undefined reference to `tok_ident'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:878: undefined reference to `table_ident'
libtcc.o: In function `tcc_free':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:210: undefined reference to `table_ident'
libtcc.o: In function `tcc_cleanup':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:882: undefined reference to `nb_sym_pools'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:882: undefined reference to `sym_pools'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:884: undefined reference to `tokcstr'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:884: undefined reference to `cstr_free'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:886: undefined reference to `sym_free_first'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:888: undefined reference to `macro_ptr'
libtcc.o: In function `put_extern_sym2':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:524: undefined reference to `symtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:461: undefined reference to `get_tok_str'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:522: undefined reference to `symtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:522: undefined reference to `add_elf_sym'
libtcc.o: In function `greloc':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:547: undefined reference to `symtab_section'
libtcc.o: In function `tcc_split_path':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:312: undefined reference to `cstr_new'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:319: undefined reference to `cstr_ccat'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:322: undefined reference to `cstr_ccat'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:317: undefined reference to `cstr_cat'
libtcc.o: In function `tcc_compile':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:717: undefined reference to `preprocess_init'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:719: undefined reference to `cur_text_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:720: undefined reference to `funcname'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:721: undefined reference to `anon_sym'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:743: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:741: undefined reference to `symtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:741: undefined reference to `put_elf_sym'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:749: undefined reference to `char_pointer_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:746: undefined reference to `int_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:748: undefined reference to `char_pointer_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:749: undefined reference to `mk_pointer'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:758: undefined reference to `int_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:754: undefined reference to `size_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:757: undefined reference to `func_old_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:758: undefined reference to `sym_push'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:758: undefined reference to `func_old_type'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:777: undefined reference to `define_stack'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:778: undefined reference to `nocode_wanted'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:806: undefined reference to `free_defines'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:808: undefined reference to `gen_inline_functions'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:810: undefined reference to `global_stack'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:810: undefined reference to `sym_pop'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:811: undefined reference to `local_stack'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:811: undefined reference to `sym_pop'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:726: undefined reference to `text_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:726: undefined reference to `symtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:726: undefined reference to `put_elf_sym'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:735: undefined reference to `text_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:734: undefined reference to `put_stabs_r'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:737: undefined reference to `text_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:736: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:736: undefined reference to `put_stabs_r'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:787: undefined reference to `vtop'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:784: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:785: undefined reference to `tok_flags'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:786: undefined reference to `parse_flags'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:784: undefined reference to `ch'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:788: undefined reference to `next'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:789: undefined reference to `decl'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:790: undefined reference to `tok'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:791: undefined reference to `expect'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:792: undefined reference to `vtop'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:798: undefined reference to `text_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:797: undefined reference to `put_stabs_r'
libtcc.o: In function `tcc_open_bf':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:673: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:674: undefined reference to `file'
libtcc.o: In function `tcc_close':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:679: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:682: undefined reference to `total_lines'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:684: undefined reference to `file'
libtcc.o: In function `tcc_open':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:702: undefined reference to `file'
libtcc.o: In function `memcpy':
/usr/include/x86_64-linux-gnu/bits/string3.h:51: undefined reference to `file'
/usr/include/x86_64-linux-gnu/bits/string3.h:51: undefined reference to `file'
libtcc.o: In function `tcc_define_symbol':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:841: undefined reference to `file'
libtcc.o:/home/niusha/Downloads/tcc-0.9.26/libtcc.c:845: more undefined references to `file' follow
libtcc.o: In function `tcc_define_symbol':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:845: undefined reference to `ch'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:846: undefined reference to `next_nomacro'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:847: undefined reference to `parse_define'
libtcc.o: In function `tcc_undefine_symbol':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:857: undefined reference to `tok_alloc'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:858: undefined reference to `define_find'
libtcc.o: In function `tcc_new':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:909: undefined reference to `preprocess_new'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:914: undefined reference to `define_push'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:915: undefined reference to `define_push'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:916: undefined reference to `define_push'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:917: undefined reference to `define_push'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:998: undefined reference to `text_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:999: undefined reference to `data_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1000: undefined reference to `bss_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1003: undefined reference to `new_symtab'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1003: undefined reference to `symtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1006: undefined reference to `strtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1010: undefined reference to `new_symtab'
libtcc.o: In function `tcc_delete':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1049: undefined reference to `dlclose'
libtcc.o: In function `tcc_add_file_internal':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1141: undefined reference to `tcc_assemble'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1128: undefined reference to `tcc_preprocess'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1147: undefined reference to `tcc_assemble'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1152: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1195: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1196: undefined reference to `tcc_load_archive'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1211: undefined reference to `tcc_load_ldscript'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1168: undefined reference to `file'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1179: undefined reference to `dlopen'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1184: undefined reference to `tcc_load_dll'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1170: undefined reference to `tcc_load_object_file'
libtcc.o: In function `tcc_add_symbol':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1293: undefined reference to `symtab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1293: undefined reference to `add_elf_sym'
libtcc.o: In function `tcc_set_output_type':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1330: undefined reference to `stab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1332: undefined reference to `stabstr_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1333: undefined reference to `put_elf_str'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1334: undefined reference to `stabstr_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1334: undefined reference to `stab_section'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1336: undefined reference to `put_stabs'
libtcc.o: In function `tcc_parse_args':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1721: undefined reference to `cstr_new'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1898: undefined reference to `cstr_free'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1862: undefined reference to `cstr_ccat'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1863: undefined reference to `cstr_cat'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1864: undefined reference to `cstr_ccat'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1790: undefined reference to `tcc_set_num_callers'
libtcc.o: In function `tcc_print_stats':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1935: undefined reference to `total_bytes'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1939: undefined reference to `total_lines'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1937: undefined reference to `tok_ident'
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:1936: undefined reference to `total_bytes'
libtcc.o: In function `greloc':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:547: undefined reference to `put_elf_reloc'
libtcc.o: In function `tcc_undefine_symbol':
/home/niusha/Downloads/tcc-0.9.26/libtcc.c:861: undefined reference to `define_undef'
collect2: error: ld returned 1 exit status


Could you please help me to get his fixed? I really need this installed on my machine so I can compile c in python and do my work.

Thanks,
Niusha

On Sun, Jul 17, 2016 at 5:57 PM, Niyousha D <address@hidden> wrote:
Hello,

I am trying to install tcc-0.9.26.tar.bz2.sig,but I have no idea how to do it.
I am working in Linux, and I'm coding in python, and I want to compile a C file in python, that is why I am trying to install this.

This file I already have downloaded. The only issue I have is I don't know how to install it.

Could you help me with this?

Thanks,
Niusha


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




--
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]