Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dejagnu link variable not set correctly. #1783

Closed
tlattner opened this issue May 11, 2007 · 13 comments
Closed

dejagnu link variable not set correctly. #1783

tlattner opened this issue May 11, 2007 · 13 comments
Labels
bugzilla Issues migrated from bugzilla test-suite

Comments

@tlattner
Copy link
Contributor

Bugzilla Link 1411
Resolution FIXED
Resolved on Feb 22, 2010 12:50
Version trunk
OS MacOS X

Extended Description

Feature/llvm2cpp.ll fails for a release build because the "link" variable is not set correctly by dejagnu.
/usr/bin/ld: can't locate file for: -lLLVMCore

This should be fixed.

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

I'm pretty certain the patch resolves any issue with the dejagnu variables.
Re-open if the problem persists.

@tlattner
Copy link
Contributor Author

I'm stilling getting this with a Release build on x86 (after using the new
Makefile):

FAIL: /mounts/zion/disks/0/localhome/tbrethou/llvm/test/Feature/llvm2cpp.ll
Failed with exit(1) at line 3
while running: g++ -I/mounts/zion/disks/0/localhome/tbrethou/llvm/test
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/test
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -g -fno-exceptions -D_DEBUG -Woverloaded-virtual
-pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter
-g -L/mounts/zion/disks/0/localhome/tbrethou/llvm/Debug/lib
-L/mounts/zion/disks/0/localhome/tbrethou/llvm/Debug/lib -o
Output/llvm2cpp.ll.tmp2.exe Output/llvm2cpp.ll.tmp2.cpp -lLLVMCore -lLLVMSupport
-lLLVMSystem -lstdc++
Output/llvm2cpp.ll.tmp2.cpp: In function ‘llvm::Module* makeLLVMModule()’:
Output/llvm2cpp.ll.tmp2.cpp:1991: warning: unused variable ‘ptr_Z’
Output/llvm2cpp.ll.tmp2.cpp:2006: warning: unused variable ‘ptr_Z_203’
Output/llvm2cpp.ll.tmp2.cpp:2033: warning: unused variable ‘int32_217’
Output/llvm2cpp.ll.tmp2.cpp:2035: warning: unused variable ‘int1_219’
Output/llvm2cpp.ll.tmp2.cpp:2387: warning: unused variable ‘int32_287’
Output/llvm2cpp.ll.tmp2.cpp:2395: warning: unused variable ‘int32_289’
Output/llvm2cpp.ll.tmp2.cpp:2414: warning: unused variable ‘int32_293’
[cut same type warnings]
Output/llvm2cpp.ll.tmp2.cpp:1681: warning: unused variable ‘gvar_int32_114’
/usr/bin/ld: cannot find -lLLVMCore
collect2: ld returned 1 exit status

From site.exp:
set link "g++ -I/mounts/zion/disks/0/localhome/tbrethou/llvm/test
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/test
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -g -fno-exceptions -D_DEBUG -Woverloaded-virtual
-pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter
-g -L/mounts/zion/disks/0/localhome/tbrethou/llvm/Debug/lib
-L/mounts/zion/disks/0/localhome/tbrethou/llvm/Debug/lib "

Shouldn't it be look in Release/lib?

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

Yes. The question is, why isn't it. The Makefile.rules has (paraphrased):

ifdef ENABLE_PROFILING
BuildMode := Profile
else
ifeq ($(ENABLE_OPTIMIZED),1)
BuildMode := Release
else
BuildMode := Debug
LD.Flags := -g
endif
endif

LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib
LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib

LD.Flags += -L$(LibDir) -L$(LLVMLibDir)

So, for it to come out with the result you had, ENABLE_OPTIMIZED had to be not 1

Are you sure you're building with ENABLE_OPTIMIZED=1 ?
Reid.

@tlattner
Copy link
Contributor Author

Yes I am:
[zion llvm]$ gmake check ENABLE_OPTIMIZED=1 TESTSUITE=Feature
llvm[0]: Running test suite
gmake[1]: Entering directory `/mounts/zion/disks/0/localhome/tbrethou/llvm/test'
( ulimit -t 600 ; ulimit -d 512000 ; \

PATH="/mounts/zion/disks/0/localhome/tbrethou/llvm/Release/bin:/mounts/zion/disks/0/localhome/tbrethou/llvm/test/Scripts:/mounts/zion/disks/0/localhome/tbrethou/llvm/Release/bin:/mounts/zion/disks/0/localhome/tbrethou/llvm-gcc/install/bin:/home/vadve/shared/localtools/fc1/bin:/localhome/tbrethou/llvm/Debug/bin/:/usr/dcs/software/evaluation/bin/:/usr/dcs/software/supported/bin:/usr/dcs/software/unsupported/bin:/usr/dcs/software/evaluation/bin:/bin:/usr/bin:/usr/X11R6/bin/:/home/vadve/tbrethou/llvm/utils:/home/vadve/lattner/local/x86/bin"

/home/vadve/shared/localtools/fc1/bin/runtest --tool Feature --ignore
llvm2cpp.exp )
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
Test Run By tbrethou on Fri May 11 14:10:57 2007
Native configuration is i686-pc-linux-gnu

            === Feature tests ===

Schedule of variations:
unix

Running target unix
Using /home/vadve/shared/localtools/fc1/share/dejagnu/baseboards/unix.exp as
board description file for target.
Using /home/vadve/shared/localtools/fc1/share/dejagnu/config/unix.exp as generic
interface file for target.
WARNING: Couldn't find tool config file for unix, using default.
Running /mounts/zion/disks/0/localhome/tbrethou/llvm/test/Feature/dg.exp ...
FAIL: /mounts/zion/disks/0/localhome/tbrethou/llvm/test/Feature/llvm2cpp.ll
Failed with exit(1) at line 3
while running: g++ -I/mounts/zion/disks/0/localhome/tbrethou/llvm/test
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/test
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include
-I/mounts/zion/disks/0/localhome/tbrethou/llvm/include -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -g -fno-exceptions -D_DEBUG -Woverloaded-virtual
-pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter
-g -L/mounts/zion/disks/0/localhome/tbrethou/llvm/Debug/lib
-L/mounts/zion/disks/0/localhome/tbrethou/llvm/Debug/lib -o
Output/llvm2cpp.ll.tmp2.exe Output/llvm2cpp.ll.tmp2.cpp -lLLVMCore -lLLVMSupport
-lLLVMSystem -lstdc++
Output/llvm2cpp.ll.tmp2.cpp: In function ‘llvm::Module* makeLLVMModule()’:
Output/llvm2cpp.ll.tmp2.cpp:1991: warning: unused variable ‘ptr_Z’
[cut]

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

Trez weird.

I'll poke around some.

@tlattner
Copy link
Contributor Author

This isn't a 2.0 blocker so no hurry. Worst case, I can remove the test from the
release.

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

Tanya,

I can't reproduce this. I get:

make check ENABLE_OPTIMIZED=1 TESTSUITE=Feature
llvm[0]: Running test suite
make[1]: Entering directory `/proj/llvm/llvm-4/test'
( ulimit -t 600 ; ulimit -d 512000 ; \

PATH="/proj/llvm/llvm-4/Release/bin:/proj/llvm/llvm-4/test/Scripts:/proj/llvm/llvm-4/Debug/bin:/proj/install/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/reid/bin:/opt/j2sdk_1.4.2/j2sdk1.4.2/bin:/opt/oracle/bin"

/proj/install/bin/runtest --tool Feature --ignore llvm2cpp.exp )
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
Test Run By reid on Fri May 11 12:47:02 2007
Native configuration is i686-pc-linux-gnu

            === Feature tests ===

Schedule of variations:
unix

Running target unix
Using /proj/install/share/dejagnu/baseboards/unix.exp as board description file
for target.
Using /proj/install/share/dejagnu/config/unix.exp as generic interface file for
target.
WARNING: Couldn't find tool config file for unix, using default.
Running /proj/llvm/llvm-4/test/Feature/dg.exp ...

            === Feature Summary ===

of expected passes 47

make[1]: Leaving directory `/proj/llvm/llvm-4/test'

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

Do you have environment variables overriding any of the Makefile variables?

@tlattner
Copy link
Contributor Author

No. I don't have anything but PATH and CVSDIR set.

Do you have a release build? Its probably better if you can reproduce this in
your tree or not. If you don't have time, no big deal. Like I said, its not a
release blocker. Thanks Reid.

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2007

Its not a release blocker, but its a concern because if it can happen here, it
can happen on any build and that's a major issue for 2.0.

I do have a release build and it works fine .. but perhaps only because its
finding my debug build too, in the same directory. I'll try it in a separate
environment and see what happens.

@tlattner
Copy link
Contributor Author

Yeah, try it after you delete your Debug dir.

@llvmbot
Copy link
Collaborator

llvmbot commented May 15, 2007

Even with the Debug directory gone, it still works fine using Release binaries:

testcase /proj/llvm/llvm/test/Feature/dg.exp completed in 25 seconds

            === Feature Summary ===

of expected passes 47

runtest completed at Mon May 14 22:38:50 2007

I verified manually that the program generated by llvm2cpp could be compiled,
executed and that it produced the same .ll file as the input.

I don't know what's going on in the 2.0 release, but this is definitely working
for 2.1

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla test-suite
Projects
None yet
Development

No branches or pull requests

2 participants