Code Monkey home page Code Monkey logo

open64's People

Contributors

laijx03 avatar shinmingliu avatar yvan-xy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open64's Issues

[SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1082: ### Find_parm_type cannot find _temp_vararg1

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

void
Die(char *format, ...)
{
  va_list  argp;
				/* format the error mesg */
  fprintf(stderr, "\nFATAL: ");
  va_start(argp, format);
  vfprintf(stderr, format, argp);
  va_end(argp);
  fprintf(stderr, "\n");
  fflush(stderr);
				/* exit  */
  exit(1);
}

error:

2023-10-28 11:11:33,263 - xcalcc - ERROR - !!! Log: (null) :Translating Die(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1082:
### Find_parm_type cannot find _temp_vararg1
### For a.O in Die (xcalcc:583)

[SPEC2006]### Compiler Error during Reading WHIRL file phase: ### OPCODE_make_op: no opcode available: 0 0 0

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

double sre_random(void)
{
	static long  rnd1;
	static long  rnd2;
	static long  tbl[64];
	int i;
	for (i = 0; i < 64; i++) {
		tbl[i] = rnd1-rnd2;
		if (tbl[i] < 0)
			tbl[i] += 1;
	}
	return 0;
}

error:

2023-10-28 12:11:31,364 - xcalcc - ERROR - ### Assertion failure at line 223 of /root/ci/workspace/open64_version_build/open64/build/../osprey/common/com/opcode.h:
### Compiler Error during Reading WHIRL file phase:
### OPCODE_make_op: no opcode available: 0 0 0
Support Message:
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll() [0x17d3258]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll() [0x17d331d]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll(Fail_FmtAssertion+0x2c2) [0x17d50eb]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll(OPCODE_make_op+0x68) [0x485b2b]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll(_Z9WN_opcodePK2WN+0x3c) [0x4870dc]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/be.so(IPA_WN_MAP_Set+0x4c) [0x7fded7458f1e]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/be.so(_ZN22ARRAY_DIRECTED_GRAPH1610Add_VertexEP2WN+0x6c) [0x7fded72f21a4]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/be.so(Depgraph_Read+0xe6) [0x7fded72f1c09]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/be.so(_Z15WN_get_depgraphPvP7pu_info+0x140) [0x7fded741aad5]
    /open64//bin/../lib/gcc-lib/x86_64-open64-linux/5.0/be.so(_Z15Read_Local_InfoP8mem_poolP7pu_info+0x2d5) [0x7fded741b40e]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll() [0x47c9b7]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll() [0x47ddec]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fded6950083]
    /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/w2ll() [0x468da5] (xcalcc:583)

open64-w2ll/osprey/ir_tools/irbuild.cxx:16:10: fatal error: mir_parser.h: No such file or directory

When I use environment variable like below:

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HOME=`pwd`
export CLANG_HOME=$HOME/opt/x86_64
export LLVM_HOME=$CLANG_HOME
export PATH=$CLANG_HOME/bin:$PATH
export PATH=$HOME/local/bin:$PATH
export PATH=$HOME/local/lib/gcc-lib/x84_64-open64-linux/5.0:$PATH

Configure「open64-w2ll/configure」has the following tips:

checking MAPLE_HOME is set ...no
==========================================================
please set MAPLE_HOME which include the maple prebuilt libs
**** js2mpl and mpl2whirl won't be built ****
==========================================================
checking MOZJS_HOME is set ...no
==========================================================
please set MOZJS_HOME which include the mozjs prebuilt libs
**** js2mpl won't be built ****
==========================================================

make no error, make install prompts missing libraries:

osprey/targdir_lib/libacml_mv/libacml_mv.a does not exist
osprey/targdir_lib/libacml_mv/libacml_mv.so.1 does not exist
osprey/targdir_lib2/libmv/libmv.a does not exist
osprey/targdir_lib2/libmv/libmv.so.1 does not exist
osprey/targdir_lib2/libopenmp/libopenmp.a does not exist
osprey/targdir_lib2/libopenmp/libopenmp.so.1 does not exist
osprey/targdir_lib2/libacml_mv/libacml_mv.a does not exist
osprey/targdir_lib2/libacml_mv/libacml_mv.so.1 does not exist

I can't use functions like fastsin, fastcos etc when using opencc。

 undefined reference to `fastsin'
 undefined reference to `fastcos'

When I use environment variable like below:

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HOME=`pwd`
export MOZJS_HOME=/usr/lib
export MAPLE_HOME=$HOME/opt/maple2023/lib
export CLANG_HOME=$HOME/opt/x86_64
export LLVM_HOME=$CLANG_HOME
export PATH=$CLANG_HOME/bin:$PATH
export PATH=$HOME/local/bin:$PATH
export PATH=$HOME/local/lib/gcc-lib/x84_64-open64-linux/5.0:$PATH

It is normal when configuring 「open64-w2ll/configure」, but the following error is reported when executing make:

make[3]: leave directory“/mnt/sdbdata/qgw/open64/build/osprey-gcc-4.2.0”
make[2]: leave directory“/mnt/sdbdata/qgw/open64/build/osprey-gcc-4.2.0”
make[1]: leave directory“/mnt/sdbdata/qgw/open64/build”
make: *** [Makefile:406:build] error 2

Use make -j1 to get the following information:

C++    /mnt/sdbdata/qgw/open64/build/osprey/targdir/ir_tools/../../../../open64-w2ll/osprey/ir_tools/irbuild.cxx
../../../../open64-w2ll/osprey/ir_tools/irbuild.cxx:16:10: fatal error: mir_parser.h: No such file or directory
   16 | #include "mir_parser.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/mnt/sdbdata/qgw/open64/build/../open64-w2ll/osprey/linux/make/gcommonrules:149:irbuild.o] error 1
make[3]: leave directory“/mnt/sdbdata/qgw/open64/build/osprey/targdir/ir_tools”
make[2]: *** [../../../../open64-w2ll/osprey/ir_tools/Makefile.gbase:232:default] error 2
make[2]: leave directory“/mnt/sdbdata/qgw/open64/build/osprey/targdir/ir_tools”
make[1]: *** [Makefile:360:ir_b2a] error 2
make[1]: leave directory“/mnt/sdbdata/qgw/open64/build”
make: *** [Makefile:406:build] error 2

I did not find the file 「mir_parser.h」. How can I get this file and build the open64 project correctly?

build oepncc & xcalcc issues

open64 repo on github, branch w2ll can build open64 & xcalcc, but still have some issues :
opencc & xcalcc:

  1. There should be no warnings
  2. xcalcc --version error
    openCC & xcalc++:
  3. There should be no warnings
  4. xcalc++ build cpp error
  5. xcalc++ --version error

Migration to GitHub is not complete

Dear @open64-compiler team, @ributzka, @suneeljain, @shockwavemoto, @xcllnt, ...

It will be nice to remove old parts like:

Can you add a "move" box like https://sourceforge.net/projects/handbrake for example.

To disable/delete tabs, go here: https://sourceforge.net/projects/open64/
To add a new tab, go here: https://sourceforge.net/projects/open64/
To change informations, go here: https://sourceforge.net/p/open64/admin/overview
To export, go here: https://sourceforge.net/p/open64/admin/export

The new place can be added in:

Thanks in advance.

Xcalcc not support global and static char a[10] = {"hello"};

char a1[10] = {"hello"};  //ng1

int main()
{
        char a2[10] = {"hello"};
        char a3[10] = "hello";
        static char a4[10] = {"hello"};  //ng2
        static char a5[10] = "hello";  
        static char a6[10] = {};
        static char a7[10] = {'h'};
        static char a8[10] = {'h','e','l','l','o'};
}

for a1[10], xcalcc log:

2023-08-24 14:04:57,428 - xcalcc - ERROR - !!! Log: (null) :Translating main(0)

!!! DevWarn: main :Stmt2llvm: ingore PRAGMA stmt now

### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1265:
### Wty2llvmty: constant string should be array
### For array.O in main (xcalcc:580)

for a4[10], xcalcc log:

2023-08-24 14:05:27,382 - xcalcc - ERROR - !!! Log: (null) :Translating main(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1265:
### Wty2llvmty: constant string should be array
### For array.O in main (xcalcc:580)

[SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:5298: ### WHIRL2llvm::EXPR2llvm, operator OPR_LAND not handled

spec2k6 462.libquantum build fail.
one of the errors can be reproduce by the following code:

float _Complex x;
int foo()
{
	if(x)
		return 1;
	return 0;
}

cmd

xcalcc -c a.c

error:

2023-10-28 16:22:40,137 - xcalcc - ERROR - !!! Log: (null) :Translating foo(0)

!!! DevWarn: foo :Stmt2llvm: ingore PRAGMA stmt now

### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:5298:
### WHIRL2llvm::EXPR2llvm, operator OPR_LAND not handled
### For a.O in foo (xcalcc:583)

[SPEC2006] error: null must be a pointer type @buffer_1_1 = internal global [512 x i8] null, align 1

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

char *foo()
{
  static char buffer[512];
  static char *sptr = buffer;
  return sptr;
}

cmd

xcalcc -c a.c

error:


2023-10-28 10:23:10,949 - xcalcc - ERROR - /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: error: /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: a.O.ll:4:42: error: null must be a pointer type
@buffer_1_1 = internal global [512 x i8] null, align 1
                                         ^ (xcalcc:630)

Xcalcc not support variable arguments

For this program

int print(int a, ...)
{
}

Xcalcc build error:

2023-08-24 13:49:35,388 - xcalcc - ERROR - !!! Log: (null) :Translating print(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1082:
### Find_parm_type cannot find _temp_vararg1
### For printf.O in print (xcalcc:580)

[SPEC2006] Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1903: CreateExt: rhs should be floating type

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

extern double foo();
float bar()
{
	return foo();
}

cmd

xcalcc -c a.c

error:

2023-10-28 00:06:14,311 - xcalcc - ERROR - !!! Log: (null) :Translating bar(0)

!!! DevWarn: bar :Stmt2llvm: ingore PRAGMA stmt now

### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1903:
### CreateExt: rhs should be floating type
### For a.O in bar (xcalcc:583)

[SPEC2006] w2ll: Get assertion when returning the small struct by value

Extract from 473.astar/CreateWay_.cpp
xcalcc -c case.cpp

class rvectort {
public:
  float x, y, z;
};
struct createwayinfot {
  rvectort finishp;
};
struct wayinfot {
  rvectort *wayarp;
};
class wayobj {
  createwayinfot createwayinfo;
  void gety(float);
  rvectort getpoint();
  bool createway(const rvectort &, const rvectort &, bool, wayinfot &);
};
bool wayobj::createway(const rvectort &startp, const rvectort &finishp,
                       bool flcorrect, wayinfot &wayinfo) {
  gety(finishp.z);
  if (flcorrect)
    createwayinfo.finishp = getpoint();
  wayinfo.wayarp[0] = startp;
}

The return value of getpoint() would be stored in PREG_F17 and PREG_F18. This is because the class rvectort is a small struct. The larger structs that are more than 16 bytes would be returned by the fake parameter of the callee.

Here is another small case:

struct A {int a; double b;};
auto f(int a, double b) {
    return A{a, b};
}

auto b(int a, double b) {
  return f(a, b);
}

[SPEC2006]error: null must be a pointer type @u_1_1 = internal global double null, align 8 ^ (xcalcc:630)

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

double bar(void);

double foo()
{
  static double u;
  u = bar();
  return u;
}

cmd:

xcalcc -c a.c

error:

2023-10-28 11:52:11,553 - xcalcc - ERROR - /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: error: /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: a.O.ll:4:33: error: null must be a pointer type
@u_1_1 = internal global double null, align 8
                                ^ (xcalcc:630)

'stddef.h' file not found when run openCC

# cat /toolchain/helloworld/hello.c
#include <stdio.h>

int main()
{
        printf("hello\n");
}

# bin/openCC -clang -emit-llvm -fno-exceptions -O3 -OPT:malloc_alg=off -PHASE:c=off -c -sw -kp /toolchain/helloworld/hello.c
openCC WARNING: unknown flag: -sw
openCC WARNING: unknown flag: -kp
openCC WARNING: unsupported vendor_id in /proc/cpuinfo, defaulting to basic 64-bit x86.
In file included from /toolchain/helloworld/hello.c:1:
/usr/include/stdio.h:33:11: fatal error: 'stddef.h' file not found
# include <stddef.h>
          ^~~~~~~~~~
1 error generated.

Build issues

I would like to build open64 but i have errors when i try to build it:

checking CLANG_HOME is set ...yes
            CLANG_HOME = /clang/11.0.0/release
Removing intermediate container 14d053589b53
 ---> beff23ecaa00
Step 18/31 : RUN make -j1 && make install
 ---> Running in 0f9092d59d30
make first
make[1]: Entering directory '/open64/obj'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory '/open64/obj'
make phony_targets 
make[1]: Entering directory '/open64/obj'
make -C osprey/targdir/include
make[2]: Entering directory '/open64/obj/osprey/targdir/include'
echo '#ifndef __pathscale_defs_h' > pathscale_defs.h
echo '#define __pathscale_defs_h' >> pathscale_defs.h
echo '#define OPEN64_NAME_PREFIX "open"' >> pathscale_defs.h
echo '#define OPEN64_MAJOR_VERSION_NUM 5' >> pathscale_defs.h
echo '#define OPEN64_MINOR_VERSION_NUM 0' >> pathscale_defs.h
echo '#define OPEN64_MAJOR_VERSION "5"' >> pathscale_defs.h
echo '#define OPEN64_MINOR_VERSION "0"' >> pathscale_defs.h
echo '#define OPEN64_FULL_VERSION "5.0"' >> pathscale_defs.h
echo '#define OPEN64_GCC_VERSION "3.3.1"' >> pathscale_defs.h
echo '#define OPEN64_GCC40_VERSION "4.0.2"' >> pathscale_defs.h
echo '#define OPEN64_GCC42_VERSION "4.2.0"' >> pathscale_defs.h
echo '#define OPEN64_INSTALL_PREFIX "/usr"' >> pathscale_defs.h
echo '#define OPEN64_TARGET ""' >> pathscale_defs.h
echo '#define OPEN64_PATCH_LEVEL ""' >> pathscale_defs.h 
echo "#endif" >> pathscale_defs.h
Making sys
Making cmplrs
Making libelf
make[2]: Leaving directory '/open64/obj/osprey/targdir/include'
make -C osprey/targdir/driver
make[2]: Entering directory '/open64/obj/osprey/targdir/driver'
abort: no repository found in '/open64/obj/osprey/targdir/driver' (.hg not found)!
make first
make[3]: Entering directory '/open64/obj/osprey/targdir/driver'
abort: no repository found in '/open64/obj/osprey/targdir/driver' (.hg not found)!
make[3]: Nothing to be done for 'first'.
make[3]: Leaving directory '/open64/obj/osprey/targdir/driver'
make driver
make[3]: Entering directory '/open64/obj/osprey/targdir/driver'
abort: no repository found in '/open64/obj/osprey/targdir/driver' (.hg not found)!
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/errors.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/file_utils.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/lang_defs.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/string_utils.c
gcc  -m64  -D_SGI_SOURCE -D_LANGUAGE_C -Wformat -funsigned-char -D__GNU_BUG_WORKAROUND -Wno-unused-result -E -P -DX8664 -DOPEN64_PRODNAME='"Compiler"' -DGCC_CONFIGURE_TARG=\"x86_64-linux-gnu\" -DGCC_DIR=\"osprey-gcc-4.2.0\" -DBUILD_SRC=\"/open64/obj/..\" -DOPEN64_BUILD_DATE='"2021-06-11/09:52:56"' -DOPSCSUB -DLITTLE_ENDIAN_HOST -DHOST_IA32 -DNOOPT -fPIC -DTARG_X8664 -D__STDC_LIMIT_MACROS -DKEY -DOSP_OPT -DPATHSCALE_MERGE -DPSC_TO_OPEN64   -DSHARED_BUILD -x c ../../../../osprey/driver/OPTIONS > OPTIONS.P
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/table.c
LD     /open64/obj/osprey/targdir/driver/table
RUN    /open64/obj/osprey/targdir/driver/OPTIONS.P
touch generated
C      /open64/obj/osprey/targdir/driver/implicits.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/main.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/options.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/option_seen.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/get_options.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/opt_actions.c
../../../../osprey/driver/opt_actions.c: In function 'run_from_build':
../../../../osprey/driver/opt_actions.c:1170:18: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1170 |   new_ld_path[0] = NULL;
      |                  ^
../../../../osprey/driver/opt_actions.c:1184:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1184 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1187:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1187 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1192:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1192 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1197:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1197 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1202:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1202 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1206:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1206 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1210:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1210 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1214:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1214 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1218:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1218 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1222:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1222 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c:1226:25: warning: assignment to 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 1226 |  new_path[builddir_len] = NULL;
      |                         ^
../../../../osprey/driver/opt_actions.c: In function 'print_file_path':
../../../../osprey/driver/opt_actions.c:1531:3: warning: missing sentinel in function call [-Wformat=]
 1531 |   execlp(argv[0], argv[0], argv[1], argv[2], argv[3]);
      |   ^~~~~~
../../../../osprey/driver/opt_actions.c: In function 'print_multi_lib':
../../../../osprey/driver/opt_actions.c:1548:3: warning: missing sentinel in function call [-Wformat=]
 1548 |   execlp(argv[0], argv[0], argv[1], argv[2]);
      |   ^~~~~~
../../../../osprey/driver/opt_actions.c: In function 'Process_Hugepage_Group':
../../../../osprey/driver/opt_actions.c:2187:31: warning: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
 2187 |                 if (!(*p) || !isdigit(*p))
      |                               ^~~~~~~
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/file_names.c
../../../../osprey/driver/file_names.c: In function 'create_temp_file_name':
../../../../osprey/driver/file_names.c:231:25: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
  231 |  sprintf(pathbuf, "%s/%s", tmpdir, buf); /* full path of tmp files */
      |                         ^
../../../../osprey/driver/file_names.c:231:2: note: 'sprintf' output 2 or more bytes (assuming 513) into a destination of size 512
  231 |  sprintf(pathbuf, "%s/%s", tmpdir, buf); /* full path of tmp files */
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/objects.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/phases.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/run.c
C      /open64/obj/osprey/targdir/driver/../../../../osprey/driver/special_options.c
GEN    version_hg.c
C      /open64/obj/osprey/targdir/driver/version_hg.c
LD     /open64/obj/osprey/targdir/driver/driver
/usr/bin/ld: options.o:(.bss+0x0): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: get_options.o:(.bss+0x18): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: opt_actions.o:(.bss+0x3c): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: file_names.o:(.bss+0x14): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: objects.o:(.bss+0x10): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: phases.o:(.bss+0xd4): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: run.o:(.bss+0x3c): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: special_options.o:(.bss+0x0): multiple definition of `dump_outfile_to_stdout'; main.o:(.bss+0x58): first defined here
/usr/bin/ld: file_names.o: in function `get_object_file':
file_names.c:(.text+0x858): warning: the use of `tempnam' is dangerous, better use `mkstemp'
collect2: error: ld returned 1 exit status
make[3]: *** [../../../../osprey/driver/Makefile.gbase:301: driver] Error 1
make[3]: Leaving directory '/open64/obj/osprey/targdir/driver'
make[2]: *** [../../../../osprey/driver/Makefile.gbase:226: default] Error 2
make[2]: Leaving directory '/open64/obj/osprey/targdir/driver'
make[1]: Leaving directory '/open64/obj'
make[1]: *** [Makefile:229: driver] Error 2
make: *** [Makefile:344: build] Error 2
The command '/bin/sh -c make -j1 && make install' returned a non-zero code: 2

[SPEC2006] Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:5815: ### WHIRL2llvm::STMT2llvm, intrinsic(521) not handled

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

char buf[100];
void foo()
{
  strncpy(buf, buf+10, 10);
}

cmd

xcalcc -c a.c

error:

2023-10-28 10:40:55,053 - xcalcc - ERROR - !!! Log: (null) :Translating foo(0)

!!! DevWarn: foo :Stmt2llvm: ingore PRAGMA stmt now

### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:5815:
### WHIRL2llvm::STMT2llvm, intrinsic(521) not handled
### For a.O in foo (xcalcc:583)

[SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:2051: ### Handle_arg_diff_ty: Parameter number is wrong, expected 0 got 2

spec2k6 456.hmmer build fail.
one of the errors can be reproduce by the following code:

static  int		(*qcmp)();		/* the comparison routine */

void specqsort(compar)
	int	(*compar)();
{
	qcmp = compar;
	(*qcmp)(1, 2);
}

cmd:

xcalcc -c a.c

error:

2023-10-28 10:57:41,190 - xcalcc - ERROR - !!! Log: (null) :Translating specqsort(0)

!!! DevWarn: specqsort :Stmt2llvm: ingore PRAGMA stmt now

### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:2051:
### Handle_arg_diff_ty: Parameter number is wrong, expected 0 got 2.
### For a.O in specqsort (xcalcc:583)

[SPEC2006] w2ll: Find_parm_type cannot find _temp_vararg1

Extracted from 400.perlbench
xcalcc -S case.c

Perl_deb(char pat, ...) {}

Got the following assertion:

### Assertion failure ../../../../open64/osprey/ir_tools/whirl2llvm.cxx:1082:
### Find_parm_type cannot find _temp_vararg1
### For 4312.O in Perl_deb (xcalcc:438)

The WHIRL dump is:

 LOC 0 0 source files:	1	"/home/xman/w2ll_dev/open64_build/4312.c"
FUNC_ENTRY <1,50,Perl_deb> {line: 1/1}
 IDNAME 0 <2,1,pat>
BODY
 BLOCK {line: 0/0}
 PRAGMA 0 72 <null-st> 0 (0x0) # WOPT_FINISHED_OPTIMIZATION, 0, 4 {line: 0/0}
 END_BLOCK
 BLOCK {line: 0/0}
 END_BLOCK
 BLOCK {line: 1/1}
  I8I8LDID 6 <1,5,.preg_I8> T<5,.predef_I8,8> # $6
 I8STID 0 <2,11,_temp_vararg1> T<55,.predef_I8,8> {line: 1/1}
  I8I8LDID 7 <1,5,.preg_I8> T<5,.predef_I8,8> # $7
 I8STID 0 <2,12,_temp_vararg2> T<55,.predef_I8,8> {line: 1/1}
  I8I8LDID 8 <1,5,.preg_I8> T<5,.predef_I8,8> # $8
 I8STID 0 <2,13,_temp_vararg3> T<55,.predef_I8,8> {line: 1/1}
  I8I8LDID 9 <1,5,.preg_I8> T<5,.predef_I8,8> # $9
 I8STID 0 <2,14,_temp_vararg4> T<55,.predef_I8,8> {line: 1/1}
  I8I8LDID 10 <1,5,.preg_I8> T<5,.predef_I8,8> # $10
 I8STID 0 <2,15,_temp_vararg5> T<55,.predef_I8,8> {line: 1/1}
   I4I4LDID 1 <1,5,.preg_I8> T<4,.predef_I4,8> # $1
  I4PARM 2 T<4,.predef_I4,4> #  by_value
   U4INTCONST 8 (0x8)
  I4PARM 2 T<4,.predef_I4,4> #  by_value
   U8LDA 0 <2,16,_temp_vararg6> T<57,anon_ptr.,8>
  U8PARM 2 T<9,.predef_U8,8> #  by_value
 VINTRINSIC_CALL <805,SAVE_XMMS> 0 # flags 0x0 {line: 1/1}
 PRAGMA 0 119 <null-st> 0 (0x0) # PREAMBLE_END {line: 1/1}
 RETURN {line: 1/1}
 END_BLOCK

[SPEC2006] w2ll: OPCODE_make_op: no opcode available: 0 0 0

Extracted from 445.gobmk/engine/aftermath.c
xcalcc -c case.c

*aftermath_genmove_under_control;
aftermath_genmove_distance;
aftermath_genmove() {
  int pos;
  for (; pos; pos++)
    if (aftermath_genmove_distance)
      aftermath_genmove_under_control[pos] = 0;
    else
      aftermath_genmove_under_control[pos] = 1;
}

Got the following assertion:

### Assertion failure at line 223 of /home/xman/w2ll_dev/open64_build/../open64/osprey/common/com/opcode.h:
### Compiler Error during Reading WHIRL file phase:
### OPCODE_make_op: no opcode available: 0 0 0
Support Message:
    w2ll() [0x25679e1]
    w2ll() [0x2567ac8]
    w2ll(Fail_FmtAssertion+0x2d8) [0x2569beb]
    w2ll(OPCODE_make_op+0x64) [0x43eba8]
    w2ll(_Z9WN_opcodePK2WN+0x40) [0x440456]
    /home/xman/w2ll_dev/open64_install/lib/gcc-lib/x86_64-open64-linux/5.0/be.so(IPA_WN_MAP_Set+0x50) [0x7f1e4df3b575]
    /home/xman/w2ll_dev/open64_install/lib/gcc-lib/x86_64-open64-linux/5.0/be.so(_ZN22ARRAY_DIRECTED_GRAPH1610Add_VertexEP2WN+0x6d) [0x7f1e4ddbd173]
    /home/xman/w2ll_dev/open64_install/lib/gcc-lib/x86_64-open64-linux/5.0/be.so(Depgraph_Read+0xf9) [0x7f1e4ddbcb5d]
    /home/xman/w2ll_dev/open64_install/lib/gcc-lib/x86_64-open64-linux/5.0/be.so(_Z15WN_get_depgraphPvP7pu_info+0x144) [0x7f1e4def90bc]
    /home/xman/w2ll_dev/open64_install/lib/gcc-lib/x86_64-open64-linux/5.0/be.so(_Z15Read_Local_InfoP8mem_poolP7pu_info+0x2d1) [0x7f1e4def9a3d]
    w2ll() [0x434864]
    w2ll() [0x435d6e]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f1e4d400083]
    w2ll() [0x41fede]

opencc link error

Hi all:
I have build the open64, but when I use it to compile program, It output a link error.
The command I use open64 is as follows:
opencc hello.c
And the error is:
/usr/bin/ld: cannot find -lopen64rt: No such file or directory.
I find the open64 install directory, and its missing open64rt.so or open64rt.a, Any suggestions for this?

Xcalcc: CastToTargetType: can't handle other src-type now

source code

#include <sys/time.h>
double foo()
{
        struct timeval tp;
        struct timezone tzp;
        int i;
        i = gettimeofday(&tp,&tzp);
        return tp.tv_sec;
}

cmd

xcalcc -c a.c

error log:

2023-10-28 11:29:37,337 - xcalcc - ERROR - !!! Log: (null) :Translating mysecond(0)

!!! DevWarn: mysecond :Stmt2llvm: ingore PRAGMA stmt now

### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1985:
### CastToTargetType: can't handle other src-type now
### For simplemain.O in mysecond (xcalcc:583)

Failed to build XVSA

Build XVSA, When i make install , then error:
export TOOLROOT=/app/install;
export TOP_SRCDIR=/app/build/../open64;
/app/build/../open64/install_mastiff.sh X8664 1.0
/bin/sh: 3: /app/build/../open64/install_mastiff.sh: not found

[SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:2021: ### CastToTargetType: can't handle 16 type now

spec2k6 462.libquantum build fail.
one of the errors can be reproduce by the following code:

float _Complex  foo(float _Complex a)
{
  return a;
}

cmd

xcalcc -c a.c

error:

2023-10-28 15:37:20,705 - xcalcc - ERROR - !!! Log: (null) :Translating foo(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:2021:
### CastToTargetType: can't handle 16 type now
### For a.O in foo (xcalcc:583)

Assertion failure at line 1524 of /home/qgw/src/open64/build/../open64-w2ll/osprey/be/opt/opt_etable.cxx:

I want to compile SPEC2006 using opencc. The configuration file I am using is the linux64-amd64-gcc41.cfg provided with SPEC2006. The compiler path is set as follows:

CC           = /home/qgw/src/open64/local/bin/opencc
CXX          = /home/qgw/src/open64/local/bin/openCC
FC           = /home/qgw/src/open64/local/bin/openCC

Since there was an error during the installation of Fortran, I haven't dealt with the Fortran test programs yet.

make whirl2f.so whirl2f_be whirl2f
make[3]: Entering directory“/home/qgw/src/open64/build/osprey/targdir/whirl2f”
if ! test -e maccom.so; then ln -sf /home/qgw/src/open64/build/osprey/targdir/be/maccom.so .; fi
C++    /home/qgw/src/open64/build/osprey/targdir/whirl2f/diagnostics.o
g++: error: maccom.so: No such file or directory

The optimization options are set as follows:

default=base=default=default:
COPTIMIZE     = -O2 
CXXOPTIMIZE  = -O2 
FOPTIMIZE    = -O2

To compile the integer benchmarks of SPEC2006, the following command is used:

runspec --config=x86.try.cfg --size=test --noreportable --tune=base --iterations=1 --speed --action=build int

The compilation result is as follows:

Build errors: 400.perlbench(base), 401.bzip2(base), 403.gcc(base), 456.hmmer(base), 464.h264ref(base), 471.omnetpp(base), 473.astar(base), 483.xalancbmk(base)
Build successes: 429.mcf(base), 445.gobmk(base), 458.sjeng(base), 462.libquantum(base), 999.specrand(base)

The detailed error message for 400.perlbench is as follows, and the other benchmarks have the same error:

### Assertion failure at line 1524 of /home/qgw/src/open64/build/../open64-w2ll/osprey/be/opt/opt_etable.cxx:
### Compiler Error in file av.c during Global Optimization -- SPRE: Iphi Insertion phase:
### EXP_WORKLST::Are_different:  must not reach here.

There is an internal assertion error. Can opencc now compile SPEC2006, or are there any additional options that need to be set in the cfg file?

[SPEC2006] error: value doesn't match function result type '%x_struct = type { i32, i32 }'

spec2k6 462.libquantum build fail.
one of the errors can be reproduce by the following code:

struct x_struct {
  int y;
  int z;
};

typedef struct x_struct x;

x foo(int a)
{
	x m;
	if (a)
		exit(1);
	return m;
}

cmd

xcalcc -c a.c

error:

2023-10-28 15:56:45,554 - xcalcc - ERROR - /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: error: /open64/bin/../lib/gcc-lib/x86_64-open64-linux/5.0/llc: a.O.ll:18:7: error: value doesn't match function result type '%x_struct = type { i32, i32 }'
  ret void
      ^ (xcalcc:630)

[SPEC2006]### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1530: ### Get_arg_by_name: get argument m failed

spec2k6 462.libquantum build fail.
one of the errors can be reproduce by the following code:

struct x_struct {
  int y;
  int z;
};

typedef struct x_struct x;

void foo(x m)
{
  printf("%d\n", m.y);
}

cmd

xcalcc -c a.c

error

2023-10-28 16:04:34,571 - xcalcc - ERROR - !!! Log: (null) :Translating foo(0)


### Assertion failure ../../../../osprey/ir_tools/whirl2llvm.cxx:1530:
### Get_arg_by_name: get argument m failed
### For a.O in foo (xcalcc:583)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.