ominux / vtr-verilog-to-routing

Automatically exported from code.google.com/p/vtr-verilog-to-routing
0 stars 0 forks source link

cannot compile on OS X 10.9 #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.run "make"
2.
3.

What is the expected output? What do you see instead?
expected: compile, but failed:
...
g++ -DVPR6 -DUSING_BISON -g -DYYERROR_VERBOSE -Wall -Wno-unused-function  
-I../libarchfpga/include -I../printhandler/SRC/TIO_InputOutputHandlers 
OBJ/verilog_bison.o OBJ/verilog_flex.o OBJ/netlist_visualizer.o 
OBJ/multipliers.o OBJ/partial_map.o OBJ/errors.o OBJ/node_creation_library.o 
OBJ/netlist_utils.o OBJ/netlist_stats.o OBJ/odin_util.o OBJ/string_cache.o 
OBJ/hard_blocks.o OBJ/memories.o OBJ/queue.o OBJ/hashtable.o 
OBJ/simulate_blif.o OBJ/print_netlist.o OBJ/implicit_memory.o OBJ/adders.o 
OBJ/subtractions.o OBJ/read_xml_config_file.o OBJ/outputs.o 
OBJ/parse_making_ast.o OBJ/ast_util.o OBJ/high_level_data.o 
OBJ/ast_optimizations.o OBJ/netlist_create_from_ast.o 
OBJ/netlist_optimizations.o OBJ/output_blif.o OBJ/netlist_check.o 
OBJ/activity_estimation.o OBJ/read_netlist.o OBJ/read_blif.o 
OBJ/output_graphcrunch_format.o OBJ/verilog_preprocessor.o OBJ/odin_ii_func.o 
OBJ/odin_ii.o -o odin_II.exe -L../libarchfpga -larchfpga -lm -ldl
Undefined symbols for architecture x86_64:
  "_get_pin_cycle", referenced from:
      _is_node_ready in simulate_blif.o
      _is_node_complete in simulate_blif.o
      _update_undriven_input_pins in simulate_blif.o
      _print_update_trace in simulate_blif.o
  "_get_values_offset", referenced from:
      _get_pin_value in simulate_blif.o
      _update_pin_value in simulate_blif.o
  "_is_clock_node", referenced from:
      _create_lines in simulate_blif.o
      _write_wave_to_modelsim_file in simulate_blif.o
      _compute_and_store_value in simulate_blif.o
  "_set_pin_cycle", referenced from:
      _update_pin_value in simulate_blif.o
      _initialize_pin in simulate_blif.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [odin_II.exe] Error 1
make: *** [ODIN_II] Error 2

What version of the product are you using? On what operating system?
7.0

Please provide any additional information below.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
$

Original issue reported on code.google.com by kcleung....@gmail.com on 23 May 2014 at 10:40

GoogleCodeExporter commented 9 years ago
Here's the clue that finally tipped me off: 
http://stackoverflow.com/questions/10243018/inline-function-undefined-symbols-er
ror

Change those functions from "inline" to "static inline" in 
SRC/simulate_blif.{c,h} and you should be good to go.

Original comment by BenTH...@gmail.com on 25 Sep 2014 at 2:06

GoogleCodeExporter commented 9 years ago
An even easier approach (doesn't require source modification) is to build using 
"-std=gnu89" as a compiler option. See: 
http://clang.llvm.org/compatibility.html#inline

To do this, add "-std=gnu89" to the CFLAGS in the Makefile for ODIN_II, 
abc_with_bb_support, and ace2.

You'll also have to add "-Wno-error=return-type" to CFLAGS for 
abc_with_bb_support in order to fix a return type mismatch within the espresso 
code in ABC.

Original comment by BenTH...@gmail.com on 25 Sep 2014 at 5:43