gregrahn / tpcds-kit

TPC-DS benchmark kit with some modifications/fixes
320 stars 205 forks source link

In Ubuntu 21.04, tpcds is not building #57

Open Sach1nAgarwal opened 2 years ago

Sach1nAgarwal commented 2 years ago

$lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute

$pwd ~/tpcds-kit/tools

$make OS=LINUX gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG -DLINUX -g -Wall -o dsdgen s_brand.o s_customer_address.o s_call_center.o s_catalog.o s_catalog_order.o s_catalog_order_lineitem.o s_catalog_page.o s_catalog_promotional_item.o s_catalog_returns.o s_category.o s_class.o s_company.o s_customer.o s_division.o s_inventory.o s_item.o s_manager.o s_manufacturer.o s_market.o s_pline.o s_product.o s_promotion.o s_purchase.o s_reason.o s_store.o s_store_promotional_item.o s_store_returns.o s_subcategory.o s_subclass.o s_warehouse.o s_web_order.o s_web_order_lineitem.o s_web_page.o s_web_promotinal_item.o s_web_returns.o s_web_site.o s_zip_to_gmt.o w_call_center.o w_catalog_page.o w_catalog_returns.o w_catalog_sales.o w_customer_address.o w_customer.o w_customer_demographics.o w_datetbl.o w_household_demographics.o w_income_band.o w_inventory.o w_item.o w_promotion.o w_reason.o w_ship_mode.o w_store.o w_store_returns.o w_store_sales.o w_timetbl.o w_warehouse.o w_web_page.o w_web_returns.o w_web_sales.o w_web_site.o dbgen_version.o address.o build_support.o date.o decimal.o dist.o driver.o error_msg.o genrand.o join.o list.o load.o misc.o nulls.o parallel.o permute.o pricing.o print.o r_params.o StringBuffer.o tdef_functions.o tdefs.o text.o scd.o scaling.o release.o sparse.o validate.o -lm /usr/bin/ld: s_purchase.o:/home/ayush/tpcds-kit/tools/s_purchase.c:55: multiple definition of nItemIndex'; s_catalog_order.o:/home/ayush/tpcds-kit/tools/s_catalog_order.c:56: first defined here /usr/bin/ld: s_web_order.o:/home/ayush/tpcds-kit/tools/s_web_order.c:56: multiple definition ofnItemIndex'; s_catalog_order.o:/home/ayush/tpcds-kit/tools/s_catalog_order.c:56: first defined here /usr/bin/ld: s_web_order_lineitem.o:/home/ayush/tpcds-kit/tools/s_web_order_lineitem.c:54: multiple definition of g_s_web_order_lineitem'; s_web_order.o:/home/ayush/tpcds-kit/tools/s_web_order.c:54: first defined here /usr/bin/ld: w_catalog_page.o:/home/ayush/tpcds-kit/tools/w_catalog_page.c:52: multiple definition ofg_w_catalog_page'; s_catalog_page.o:/home/ayush/tpcds-kit/tools/s_catalog_page.c:51: first defined here /usr/bin/ld: w_warehouse.o:/home/ayush/tpcds-kit/tools/w_warehouse.c:53: multiple definition of g_w_warehouse'; s_warehouse.o:/home/ayush/tpcds-kit/tools/s_warehouse.c:51: first defined here /usr/bin/ld: w_web_site.o:/home/ayush/tpcds-kit/tools/w_web_site.c:59: multiple definition ofg_w_web_site'; s_web_site.o:/home/ayush/tpcds-kit/tools/s_web_site.c:51: first defined here collect2: error: ld returned 1 exit status make: *** [makefile:240: dsdgen] Error 1

ayushbindlish commented 2 years ago

uname -a Linux dp 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute

make --version GNU Make 4.3 Built for x86_64-pc-linux-gnu Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Complete make log: make.log

connordhenderson commented 2 years ago
gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DYYDEBUG  -DLINUX -g -Wall  -o dsdgen s_brand.o s_customer_address.o s_call_center.o s_catalog.o s_catalog_order.o s_catalog_order_lineitem.o s_catalog_page.o s_catalog_promotional_item.o s_catalog_returns.o s_category.o s_class.o s_company.o s_customer.o s_division.o s_inventory.o s_item.o s_manager.o s_manufacturer.o s_market.o s_pline.o s_product.o s_promotion.o s_purchase.o s_reason.o s_store.o s_store_promotional_item.o s_store_returns.o s_subcategory.o s_subclass.o s_warehouse.o s_web_order.o s_web_order_lineitem.o s_web_page.o s_web_promotinal_item.o s_web_returns.o s_web_site.o s_zip_to_gmt.o w_call_center.o w_catalog_page.o w_catalog_returns.o w_catalog_sales.o w_customer_address.o w_customer.o w_customer_demographics.o w_datetbl.o w_household_demographics.o w_income_band.o w_inventory.o w_item.o w_promotion.o w_reason.o w_ship_mode.o w_store.o w_store_returns.o w_store_sales.o w_timetbl.o w_warehouse.o w_web_page.o w_web_returns.o w_web_sales.o w_web_site.o dbgen_version.o address.o build_support.o date.o decimal.o dist.o driver.o error_msg.o genrand.o join.o list.o load.o misc.o nulls.o parallel.o permute.o pricing.o print.o r_params.o StringBuffer.o tdef_functions.o tdefs.o text.o scd.o scaling.o release.o sparse.o validate.o -lm
/usr/bin/ld: s_purchase.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_purchase.c:55: multiple definition of `nItemIndex'; s_catalog_order.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_catalog_order.c:56: first defined here
/usr/bin/ld: s_web_order.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_web_order.c:56: multiple definition of `nItemIndex'; s_catalog_order.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_catalog_order.c:56: first defined here
/usr/bin/ld: s_web_order_lineitem.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_web_order_lineitem.c:54: multiple definition of `g_s_web_order_lineitem'; s_web_order.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_web_order.c:54: first defined here
/usr/bin/ld: w_catalog_page.o:/home/db2admin/tpc-ds/tpcds-kit/tools/w_catalog_page.c:52: multiple definition of `g_w_catalog_page'; s_catalog_page.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_catalog_page.c:51: first defined here
/usr/bin/ld: w_warehouse.o:/home/db2admin/tpc-ds/tpcds-kit/tools/w_warehouse.c:53: multiple definition of `g_w_warehouse'; s_warehouse.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_warehouse.c:51: first defined here
/usr/bin/ld: w_web_site.o:/home/db2admin/tpc-ds/tpcds-kit/tools/w_web_site.c:59: multiple definition of `g_w_web_site'; s_web_site.o:/home/db2admin/tpc-ds/tpcds-kit/tools/s_web_site.c:51: first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:240: dsdgen] Error 1

Encountering the same issue

chribell commented 2 years ago

I had the same issue with gcc-11. However, it compiles fine with gcc-9.

akashsha1 commented 1 year ago

+1 to @chribell .. works fine with gcc-9, but fails with gcc-11. I ran: make CC=gcc-9 OS=LINUX

MGelbana-Incorta commented 1 year ago

The solution failed for me at the beginning, but make clean made it work. Obviously I had some bad output from previous runs using my default gcc (i.e. gc v11).

f2008700 commented 1 year ago

https://www.linuxcapable.com/how-to-install-gcc-compiler-on-ubuntu-linux/

in case anyone needs to figure out configure alternate gcc version